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
\S
The \S metacharacter matches non-whitespace characters.
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.
Metacharacter patterns:
\S, \S....., \Sle, a\S, .C\S\Se....\S
Note: Commas are not parts of the patterns.
You will see the result here