Regex tester
Highlight matches, inspect captures, preview replacements and export text or example code.
Instructions and limits
- Enter a JavaScript regex without surrounding slashes, select flags and add test text.
- Run to inspect highlights, capture groups and positions; switch to Replace to preview, copy or download replacements.
Up to 1000 pattern characters and 50K text characters. Execution stops after 1.5 seconds; display is capped at 200 matches and replacement output at 200K characters. Without g, only the first match is processed.
Use cases and example
Highlight JavaScript regex matches, inspect capture groups and named groups, or preview replacements using $1 or $<name>.
For example, enter [A-Z]{2}\d{4} and the text “Order AB1234”, then select Test to inspect the AB1234 match.
Up to 1000 pattern characters and 50K test characters. Execution stops after 1.5 seconds, with at most 200 displayed matches and 200K replacement characters. Without g, only the first match is processed. Positions use JavaScript string indices.