Online Regex Tester
Type a regular expression, pick flags, and test it against your text with live match highlighting, capture groups, and a replace mode.
Flags
Common pattern presets
0
Matches
0
Capture groups
/g
Active pattern
Highlighted matches
Match list (full match plus up to 9 groups)
| # | Match | Position | Groups |
|---|---|---|---|
| No matches yet. | |||
Replace result
Flag reference
| Flag | Name | Meaning |
|---|---|---|
| g | global | Find all matches, not just the first one |
| i | ignore case | Match upper and lower case letters equally |
| m | multiline | ^ and $ match the start and end of each line |
| s | dotAll | The dot . also matches line breaks |
| u | unicode | Full Unicode support in the pattern |
| y | sticky | Match only from the current position onward |
Frequently asked questions
All six JavaScript flags: g for global, i for case-insensitive, m for multiline, s for dotAll, u for unicode and y for sticky matching.
Email address, URL, phone number, date, IPv4 address and hex color. Each preset fills in the pattern and loads matching sample text.
Turn on Replace mode, type a replacement string, and the tool shows the replaced text live. You can reference captured groups with $1 to $9 and the full match with $&.
The tool shows the exact error message under the pattern field so you can fix the mistake quickly.
No. All testing happens locally in your browser, so your pattern and test text never leave your device.
Yes, it is completely free with no signup required.