Regex Tester
Try a regular expression against your own text and see the matches highlighted as you type, with capture groups broken out. Runs in a sandbox so a runaway pattern cannot freeze the page.
🔒 Runs entirely in your browser. Nothing you type is sent anywhere.
How to use it
- Type a regular expression in the pattern box, without the surrounding slashes.
- Tick the flags you need: global, ignore case, multiline, dotall.
- Paste your test text. Matches highlight as you type, and capture groups are listed below.
The flags
- g (global): find every match, not just the first.
- i (ignore case): treat upper and lower case as the same.
- m (multiline): make
^and$match at the start and end of each line. - s (dotall): let
.match newlines too.
Why it runs in a sandbox
Some patterns, usually ones with nested quantifiers against the wrong input, can send a regex engine into “catastrophic backtracking” and hang for a very long time. This tester runs your pattern in a separate browser worker with a time limit, so if a pattern misbehaves it is stopped and you get a warning instead of a frozen tab. That same failure mode is a real denial-of-service risk in server code, so it is worth knowing about.
FAQ
Which regex dialect is this? JavaScript’s. It is close to PCRE for everyday patterns, but a few advanced features differ. For patterns destined for grep, PHP or Python, double-check the edge cases in that language.
Is anything sent to a server? No. The matching runs in your browser.