Regex Tester
Test regular expressions with live highlighting, match details, and replacement mode.
Flags:
Replace Mode
Enter pattern, test string, and replacement above
Quick Reference & Examples
| Pattern | Matches |
|---|---|
| . | Any character (except newline) |
| \d / \D | Digit / Non-digit |
| \w / \W | Word char / Non-word char |
| \s / \S | Whitespace / Non-whitespace |
| ^ / $ | Start / End of string (or line with m flag) |
| \b / \B | Word boundary / Non-boundary |
| ? + * {n,m} | Optional / One+ / Zero+ / Quantifiers |
| (...) (?:...) | Capture group / Non-capturing group |
| (?<name>...) | Named capture group |
| [abc] [^abc] | Character class / Negated class |
| a|b | Alternation (a or b) |
| (?=...) (?!...) | Lookahead / Negative lookahead |