Test regular expressions with real-time match highlighting, capture groups, and replace mode.
| \d | digit | 0-9 |
| \w | word | a-z, A-Z, 0-9, _ |
| \s | whitespace | space, tab, newline |
| . | any char | except newline |
| \D | NOT digit | negation of \d |
| \W | NOT word | negation of \w |
| \S | NOT whitespace | negation of \s |
| [abc] | character set | match a, b, or c |
| [^abc] | negated set | NOT a, b, or c |
| [a-z] | range | a through z |
| * | 0 or more | greedy |
| + | 1 or more | greedy |
| ? | 0 or 1 | optional |
| {n} | exactly n | e.g. {3} |
| {n,} | n or more | e.g. {2,} |
| {n,m} | n to m | e.g. {1,3} |
| *? | lazy | match as few as possible |
| +? | lazy | match as few as possible |
| ^ | start | beginning of line |
| $ | end | end of line |
| \b | word boundary | between \w and \W |
| \B | not boundary | negation of \b |
| (abc) | capture group | captures match |
| (?:abc) | non-capturing | groups without capture |
| | | alternation | OR, e.g. cat|dog |
| \1 | backref | refers to group 1 |
| (?=...) | lookahead | followed by ... |
| (?!...) | negative lookahead | NOT followed by ... |
| (?<=...) | lookbehind | preceded by ... |
| (?<!...) | negative lookbehind | NOT preceded by ... |
| ^\w+@\w+\.\w+$ | |
| ^\d{3}-\d{4}$ | Phone (xxx-xxxx) |
| ^#[0-9a-fA-F]{6}$ | Hex color |
| ^\d{4}-\d{2}-\d{2}$ | Date (YYYY-MM-DD) |
| ^https?://[\w.-]+ | URL |
| ^\d{17}[\dXx]$ | Chinese ID number |