JavaScript RegExp \W Modifier
Complete RegExp Object Reference
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
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:
Try-It-Yourself Demos
\W
How to use the "\W" modifier to find all the occurrences of non alphanumeric
characters using a string object.
Complete RegExp Object Reference
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|