Definition and Usage When the \W modifier is set the regular expression finds any non alphanumeric (not a-z, A-Z, 0-9 or _ ) character. S...
Definition and Usage
When the \W modifier is set the regular expression finds any non alphanumeric (not a-z, A-Z, 0-9 or _ ) character.Syntax
/\W/ |
Example
In the following code we will do a global search for the all non alphanumeric characters:var str = "Give 100%!!!"; var patt1 = /\W/g; |
The marked text below shows where the RegExp gets a match:
Give 100%!!! |