About the Regex Tester
Write a pattern and see every match highlighted in the test text as you type. Each match lists its position, numbered capture groups and named groups. Add a replacement string to preview String.replace output using $1, $<name> and $&.
The engine is your browser’s JavaScript (ECMAScript) regex engine, which supports lookbehind, named groups, Unicode property escapes (\p{L} with the u flag) and the s (dotAll) flag.
Features
- Live highlighting of all matches
- Capture and named groups
- Flags g, i, m, s, u, y
- Replace preview
- Clear syntax error messages
- Built-in cheat sheet
How to use it
- Enter your pattern and flags.
- Paste the test text.
- Inspect matches and groups; optionally preview a replacement.
Frequently asked questions
Does this work for Java, Python or PCRE regexes?
Most syntax is shared, but there are differences — e.g. possessive quantifiers and atomic groups (PCRE/Java) are not supported in JavaScript, and Python uses (?P<name>…) for named groups.