The following code works fine:
if (newPassword.match(/(.*[~,!,@,#,$,%,^,&,*,(,),_,+,{,},|,:,\,",<,>,?,`,-,=,\,;,',,,.,/].*[~,!,@,#,$,%,^,&,*,(,),_,+,{,},|,:,\,",<,>,?,`,-,=,\,;,',,,.,/])/))
but when I include " [ , ] , " in it I get an error. Anyone know how I can include " [ " and " ] " in the condition without getting the error?