JavaScript Regular Expressions
Choose
.
find a single character, except newline or line terminator
\w
find a word character
\W
find a non-word character
\d
find a digit
\D
find a non-digit character
\s
find a whitespace character
\S
find a non-whitespace character
\b
find a match at the beginning/end of a word
\B
find a match, but not at the beginning/end of a word
\0
find a NULL character
Metacharacters Playground
\d
The \d metacharacter matches digits from 0 to 9.
00
:
00
Press the Tab key in order to move faster through the form when exercising.
Enter your example
[Click me to toggle the popup tip]
A word character is a character a-z, A-Z, 0-9, including _ (underscore).
Try the following examples first. Then, create your own and exercise.
Character pattern:
"Cute cat" Has 4 _legs, And a weird (%6& 99+_] character."
Metacharacter patterns:
\d, \d\d, \d..\d, .\d, \d+
Note: Commas are not parts of the patterns.
You will see the result here