Regex Tester

Test a regular expression against sample text with live match highlighting and capture group details.

Runs entirely in your browser, nothing is uploaded
/ /
0Matches found
How to use

Test a pattern in three steps

  1. Type a regular expression pattern, and toggle flags like global or case insensitive as needed.
  2. Paste or type the text you want to test the pattern against.
  3. Matches highlight live in the text, with a details panel showing each match and its capture groups.
Why use it

Why people use the Regex Tester

Everything worth knowing before you dive in.

How it helps

A regular expression that looks right often behaves unexpectedly the first time it runs against real text, an unescaped character, a greedy quantifier, or a missing flag can all throw off the result. Testing against real sample text before dropping a pattern into code catches these problems immediately instead of during a debugging session later.

Built for real use

This tool highlights every match directly in your test string as you type, using the browser's native regular expression engine so behavior matches exactly what JavaScript will do in production. Toggling the global, case insensitive, and multiline flags updates matches live, and a details panel lists each match along with any capture groups it contains.

Private by default

It's useful for building a validation pattern for a form field, extracting structured data from text, or simply understanding why an existing pattern from documentation or a colleague isn't matching what you expect.

Pro tip

Build a pattern incrementally, start with the simplest version that matches your basic case, confirm it works against real sample text, then add complexity like optional groups one piece at a time.

FAQ

Common questions

What does the global flag do?

Without it, a pattern stops after the first match. With the global flag on, every matching occurrence in the text is found and highlighted.

Why are my capture groups not showing up?

Capture groups need parentheses in the pattern, such as (\\d+). Non-capturing groups written as (?:...) intentionally don't appear in the group list.

Does this use the same regex engine as JavaScript?

Yes, matching runs through your browser's native RegExp engine, the same one used in any JavaScript code you write.