Regex Tester
Live matching · flag toggles · named groups · pattern library — runs locally, nothing is sent to a server.
Flags
/…/g
0matches
0capture groups
Enter a pattern to see matches…
📚 Common patterns & cheatsheet — click a pattern to try it
| Token | Meaning | Token | Meaning |
|---|---|---|---|
. | any character except line break | \d \w \s | digit · word char · whitespace |
\D \W \S | NOT digit · word · whitespace | \b | word boundary |
^ $ | start · end of text (of line with m) | [abc] [^abc] | one of · none of |
[a-z0-9] | range | a|b | a or b |
* + ? | 0+ · 1+ · 0 or 1 | {3} {2,5} {2,} | exactly · between · at least |
*? +? | lazy (as few as possible) | (…) | capture group |
(?:…) | group without capturing | (?<name>…) | named group |
\1 \k<name> | back-reference | (?=…) (?!…) | lookahead · negative lookahead |
(?<=…) (?<!…) | lookbehind · negative lookbehind | \p{L} \p{N} | any letter · number (needs u) |
\. \* \\ | escape a special character | \n \t | line break · tab |