Regex Tester
Write a regular expression and see the matches highlighted as you type, with every capture group listed. You can also preview a replacement.
How to use the regex tester
- Type your pattern and tick the flags you need.
- Paste the text to test. Matches are highlighted and listed with their groups.
- Optionally type a replacement such as
$2-$1to preview the result.
This tool uses the regular expression engine of your browser, which is the JavaScript flavour. Most patterns work the same in other languages, but some features differ. A pattern with nested repetition on long text can be very slow; if the page freezes, simplify the pattern.
Frequently asked questions
Which regex flavour is it?
JavaScript (ECMAScript). Lookbehind and named groups work in modern browsers.
What do the flags mean?
g finds all matches, i ignores case, m makes ^ and $ match at every line, s lets a dot match a newline, u enables full Unicode.
Is my text uploaded?
No. Everything runs in your browser.
