Regex Tester

Test and debug your regular expressions in real-time with syntax highlighting and match results.

About this tool

A live regex tester shows you exactly what your pattern matches against real sample text as you type, instead of the slow guess-run-debug loop of testing a regex directly in code.

How to use it

  1. Type or select a regular expression pattern (a few common patterns are available as samples).
  2. Set any flags you need, like g for global matching.
  3. Paste your test string — matches are highlighted immediately, with a running match count.

FAQ

Which regex flavor does this use?

The JavaScript (ECMAScript) regex engine, since that's what the browser's native RegExp runs on — the same flavor you'd be targeting in most web-facing code.

Why isn't my pattern matching anything?

Common culprits: forgetting the g flag (so only the first match is found and highlighted), or a case-sensitivity mismatch — add the i flag for case-insensitive matching.