Regex Tester

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

About this tool

A regex tester and evaluator that shows what your pattern matches against real sample text as you type, so you can debug it before it goes into code. Type the pattern, set flags such as g or i, paste a test string and see the matches highlighted with a running count. It uses the JavaScript regular expression engine.

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.

Can I use this as a regex evaluator for other languages?

It evaluates patterns with the JavaScript engine only. Most basic syntax (classes, anchors, quantifiers, groups) behaves the same in Python, Java or PHP, but features such as lookbehind support, named group syntax and flags differ between engines, so confirm in your target language.

Related tools

Guides & comparisons

← All tools · Text & Data · Blog · Cheat sheets · FAQ