Skip to content

Regex tester

Highlight regex matches with flags.


About this tool

Test regular expressions against your own sample text and see matches highlighted instantly. Build and debug patterns without leaving the browser.

Why use it

  • Live highlighting shows exactly what your pattern matches.
  • Experiment with flags like global and case-insensitive.
  • Runs locally with immediate feedback.

Common use cases

  • Build a pattern to extract emails or dates from text.
  • Debug why a regex is matching too much or too little.
  • Learn regex by experimenting on real samples.

Tips

  • Start simple and add complexity one piece at a time.
  • Escape special characters like dot and parenthesis when you mean them literally.
How to use
  1. Enter pattern and test text.
  2. Matches highlight.
FAQ
How do I test a regular expression?
Enter your pattern and sample text to see matches highlighted in real time.
Is my text sent to a server?
No. Matching runs in your browser using the native regex engine.
Which regex flavor is used?
JavaScript regular expressions, including flags like global, case-insensitive and multiline.
Can I see capture groups?
Yes, matched groups are listed so you can confirm what each part captures.
Does it explain my pattern?
It focuses on live matching; build patterns incrementally to understand each piece.
Will it warn about catastrophic patterns?
Test on small samples first, since some patterns can be slow on large inputs.