Regex Tester

Test and debug regular expressions against sample text with live match highlighting.

/ /g
0 matches
Matches will appear here.
#MatchIndexGroups
Share:

Test and debug regular expressions online

This free online regex tester lets you build, test, and debug regular expressions against your own sample text with live match highlighting. As you type a pattern, every match lights up instantly and a running count shows how many were found — so you can see exactly what your expression captures before you drop it into your code.

How to test a regex

  1. Type or paste your regular expression into the pattern field above.
  2. Toggle the flags you need — g global, i ignore case, m multiline, s dotall, u unicode, and y sticky.
  3. Paste the text you want to match into the test-string box.
  4. Review the highlighted matches, then open the match details table to inspect each numbered and named capture group.

Common uses for a regex tester

  • Validating input — email addresses, phone numbers, postcodes, and slugs.
  • Search and replace — refine a pattern before running it in your editor or codebase.
  • Data extraction — pull dates, IDs, or tokens out of log files and raw text.
  • Learning regex — experiment safely and watch matches update in real time.

Private by design

Matching runs entirely in your browser using the native JavaScript (ECMAScript) regular-expression engine. Your pattern and your test string are never uploaded or stored on a server. Once your expression is ready, compare two versions of a file with our diff checker to confirm your search-and-replace did exactly what you intended.

Need a custom tool or internal utility built for your team? Get in touch with SR Infobiz.

Frequently Asked Questions

Which regex flavor does this use?

It uses the JavaScript (ECMAScript) regular-expression engine built into your browser, with support for the g, i, m, s, u and y flags.

Can I see capture groups?

Yes. Each match lists its numbered and named capture groups so you can verify what your pattern is extracting.

Is my pattern or text uploaded?

No. Matching runs entirely in your browser — your pattern and test string are never sent to a server.

You may also like