Test Regular Expressions Live: Match Highlighting, Groups, Replace and a Plain-Language Explanation
A regex you wrote once is often unreadable next time. Seeing the matches and an explanation together makes writing and fixing patterns faster.
How to use it
- Type the pattern, without the surrounding slashes.
- Paste the test text.
- See the highlighted matches, groups and replacement result.
- Read the explanation of the pattern piece by piece.
It uses the JavaScript engine
Results come from the browser regex engine, so they match what JavaScript will do, which can differ from PCRE or Python in details. The flags g i m s u y are supported.
Protection against freezing
Some patterns suffer catastrophic backtracking and run for a very long time. If one runs over 1.5 seconds it is stopped so the page does not freeze.
Privacy
Testing happens on your device; your text is not sent out.