Regex Tester
Test JavaScript regular expressions and replacement strings locally. See each match’s UTF-16 start/end offsets, capture groups and named groups, then download the replacement output.
Your result
How the calculation works
The selected flags create a JavaScript RegExp. Matches advance after zero-length results to avoid a loop. Replacement uses JavaScript substitution tokens. Both operations run in a dedicated worker that is terminated after a one-second safety deadline.
Worked example
Pattern (?<word>[A-Za-z]+) with g against Hello world produces two named-word matches. Replacement $<word>! produces Hello! world!.
Assumptions and limitations
This is the JavaScript flavour, not PCRE, Python or every other regex dialect. Display is capped at 1,000 matches, pasted input at 262,144 characters and replacement output at 1 MiB. A timeout is a rejected operation, not a no-match result.
Start with a small test and prefer unambiguous quantifiers. Use g to replace all matches; without g, replacement affects the first match. No visitor pattern is evaluated as JavaScript code and no text is uploaded.
Sources and editorial responsibility
Maintained by Renvoro Pty Ltd. Sources inform the methods and assumptions shown here; outputs have the limitations described on this page.
Method reviewed 2026-10-08. Calculation standards · Report an issue