Regex Tester
Test and debug regular expressions with real-time matching, replacement, and splitting.
Real-timeMatch/Replace/SplitCommon Patterns
Pattern
//g
Global (g)
Case Insensitive (i)
Multiline (m)
DotAll (s)
Unicode (u)
Test String
Results
Match
Replace
Split
Enter a pattern and test string to see matches.
Common Patterns
Quick Reference
| \d | Digit (0-9) |
| \D | Non-digit |
| \w | Word character (a-z, A-Z, 0-9, _) |
| \W | Non-word character |
| \s | Whitespace |
| \S | Non-whitespace |
| . | Any character (except newline) |
| ^ | Start of string/line |
| $ | End of string/line |
| * | 0 or more |
| + | 1 or more |
| ? | 0 or 1 (optional) |
| {n} | Exactly n times |
| {n,m} | Between n and m times |
| [abc] | Character class |
| [^abc] | Negated character class |
| (abc) | Capturing group |
| (?:abc) | Non-capturing group |
| a|b | Alternation (a or b) |
| \b | Word boundary |
