Enter a pattern or load an example to get started.
JavaScript regex quick reference
.- Any character except line breaks by default
\d- An ASCII digit
\s- A whitespace character
\b- A word boundary
[a-z]- A character in the range
(?:x)- A non-capturing group
(?<name>x)- A named capture group
x|y- Either alternative
x{2,4}- Two to four occurrences
^…$- Start and end anchors
(?=x)- Positive lookahead
\p{L}- A Unicode letter with u or v
g- All matches
i- Ignore case
m- Line anchors
s- Dot matches newlines
u- Unicode
v- Unicode sets
y- Sticky
d- Match indices
Patterns and text are processed on your device.