Regex Tester
Test regular expressions live with highlighted matches and capture groups.
Regular expression
Private by design. Everything runs locally in your browser. Your input is never uploaded, logged or stored on a server.
Frequently asked questions
Which regex flavour does this use?
JavaScript (ECMAScript). Lookbehind, named groups, sticky and unicode flags are all supported by current browsers. PCRE-only constructs such as recursion are not available.
What do the flags mean?
`g` finds every match rather than stopping at the first, `i` ignores case, `m` makes `^` and `$` match at line boundaries, `s` lets `.` match newlines, and `u` enables full Unicode handling.
Why does my pattern match nothing?
Most often an unescaped special character. Literal dots, plus signs, parentheses and question marks all need a backslash. Check the error message under the pattern field first.
Is my test data private?
Yes. Both the pattern and the test string stay in your browser and are never transmitted.
About the Regex Tester
This tester uses the browser own JavaScript regular-expression engine, so behaviour matches exactly what your code will do — no dialect differences to account for.
Matches are highlighted in the test string as you type and listed with their index and named or numbered capture groups. The replace panel previews String.replace output, including $1 backreferences and $<name> named references.
Catastrophic backtracking is the failure mode to watch for. Nested quantifiers over the same character class, such as (a+)+$, can take exponential time on a non-matching input. The tester aborts a match that runs too long rather than freezing the page.