Regex Tester

Type a pattern and test text; matches highlight live as you type, with capture groups listed below. Uses your browser's real JavaScript regex engine, so behavior matches your production code exactly.

How it works

The global flag is always applied so every match is found; toggle case- insensitive, multiline, and dotall as needed. Highlighting HTML-escapes your text first, so testing against HTML snippets is safe. Both the pattern and the test text stay on your device.

FAQ

Which regex flavor does this use?

JavaScript (ECMAScript), because it runs on your browser's own engine. Most patterns behave identically in Python, PCRE, and Java, but lookbehind and some Unicode features vary by flavor.

Why does my pattern match everything or hang other testers?

Patterns that can match an empty string (like a*) match at every position. This tester advances past empty matches and caps results at 1,000, so it can't lock up.

How do I use capture groups?

Wrap part of the pattern in parentheses. Each match's groups are listed in order under Match details — group 1 is the first parenthesis, and so on.