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