Jsref Regexp Wordchar
# JavaScript RegExp w Metacharacter
[ JavaScript RegExp Object](#)
* * *
## Definition and Usage
The w metacharacter is used to find word characters.
A word character is a character from a-z, A-Z, 0-9, and the underscore, including the _ (underscore) character.
## Syntax
new RegExp("w")
Or a simpler way:
/w/
* * *
## Browser Support

The w metacharacter is supported in all major browsers.
* * *
## Example
## Example
Perform a global search for word characters in a string:
var str="Give 100%!";
var patt1=/w/g;
The marked text below shows where the expression gets a match:
Give 100%!
[Try it yourself Β»](#)
* * JavaScript RegExp Object](#)
YouTip