Regex Tester

Validate regex patterns, see matches instantly, and debug with flags in one place.
Live matches No uploads
/ /
Use flags: g, i, m, s, u. The tool handles global matching automatically.
Test text
Runs in your browser
Matches
0
Highlighted preview
Privacy note: regex testing happens locally in your browser.

What this regex tester does

This tool lets you test regular expressions against sample text, visualize matches, and inspect captured groups in real time.

Flags and common patterns

Use flags like g (global), i (ignore case), m (multiline), and s (dotall) to control matching behavior.

Debugging tips

Start with a simple pattern, then add groups and quantifiers gradually. Check for greedy matches and zero-length matches.

How to test a regex

Enter a pattern, choose flags, and paste sample text.

  1. Type your regex pattern and pick flags.
  2. Paste sample text to test against.
  3. Review matches, groups, and highlights.

FAQ

Does this tool upload my text?
No. Everything runs locally in your browser.
Why do I see no matches?
Check your pattern, flags, and whether the text includes the expected format.
What does the g flag do?
It finds all matches instead of stopping at the first.