Developer

Regex Tester

Test regular expressions with real-time matching and group capture.

Open Regex Tester
Private — runs in your browserInstant resultsFree forever

Key Features

Real-time match highlighting
Capture group visualization
Common regex flags (g, i, m, s, u)
Match count and match list
Quick reference for common patterns
One-click copy of the regex

How to Use

1Enter your regular expression in the pattern field
2Set any flags you need (g, i, m, etc.)
3Paste your test text in the input area
4View highlighted matches and capture groups

Common Use Cases

Test a regex before adding it to your code
Debug a regex that is not matching as expected
Learn regex by experimenting with patterns
Validate input formats (emails, phones, dates)

Frequently Asked Questions

Which regex flavor is supported?
The tester uses JavaScript regex syntax, which is similar to PCRE but with some differences (no lookbehind in older browsers, no named backreferences). For most use cases, the syntax is identical.
Why does my regex work here but not in my code?
Check that you are escaping backslashes correctly in your code (e.g., \d in a string literal becomes \\d). Also verify that the flags match.

Ready to use Regex Tester?

No signup. No ads. Just open and start using it.

Open Tool Now

Related Developer Tools