When I run my JavaScript through JSLint, I get the following two errors from the same line of code.
Problem at line 398 character 29: Insecure '.'.
if (password.match(/.[!,@,
Problem at line 398 character 41: Unescaped '^'.
if (password.match(/.[!,@,
I understand that JSLint can be "overly cautious." I read comments on a similar issue, the JSLint option's purpose is "disable unsafe in regular expression" .
However, I would like to have the best of all worlds and have a working regex that also doesn't cause a JSLint complaint.
But I do not perform regex.
Is it possible to make a regular expression that looks for at least one special character, but does not cause a JSLint complaint?