Regex Tester
Test regular expressions with live match highlighting.
About the Regex Tester
Test regular expressions against sample text with live match highlighting and a numbered match table showing index, capture groups and named groups. Flags are editable โ g, i, m, s, u, y โ and a replacement tester shows the result of text.replace with $1-style references before you commit the pattern to code.
How to use the Regex Tester
- Type your pattern in the Regular expression field and set flags such as g or gi.
- Paste test text into the editor and watch matches highlight instantly.
- Inspect the match table for each match's position and capture group values.
- Tick Test replacement, enter a replacement string with $1 references, and preview the result.
Regex Tester FAQ
Are named capture groups supported?
Yes. Groups declared with (?<name>โฆ) appear in the table alongside numbered ones, so both $1 and {name} references can be verified.
How many matches are listed?
The table shows the first 100 matches with their indexes, while the highlighted output and match counter cover the whole text.
What happens with an invalid pattern?
A red note displays the regex engine error โ unclosed group, bad range and so on โ and highlighting pauses until the pattern parses again.