Regex Tester
Test regular expressions live — highlighted matches, capture groups and a replace preview. This tool runs 100% in your browser — nothing is uploaded or saved.
//
0 matches
How to use
- Type your regular expression pattern and tick the flags you need (g, i, m, s).
- Paste or type test text — matches highlight instantly and the count updates live.
- Check the list below for each match and its capture groups.
- Optionally type a replacement (use $1, $2 for groups) to preview the replaced text, then copy it.
Frequently Asked Questions (FAQ)
What does the regex tester do?
You type a regular expression and test text, and matches highlight instantly with a live match count, a list of matches and their capture groups.
Can I load a sample to try it?
Yes. Press Load Sample to fill in an example pattern and text, then experiment from there.
Which flags are supported?
The g, i, m and s flags can be ticked as needed.
Can I preview a replacement?
Yes. Type a replacement using $1, $2 for capture groups to preview the replaced text, then copy it.
Is my data private?
Yes — the tool runs 100 percent in your browser and nothing is uploaded or saved.