I\'m trying to create a Regex test in JavaScript that will test a string to contain any of these characters:
!$%^&am
A simple way to achieve this is the negative set [^\w\s]. This essentially catches:
For some reason [\W\S] does not work the same way, it doesn't do any filtering. A comment by Zael on one of the answers provides something of an explanation.