Regex Tester
Test and debug regular expressions in real time. See all matches highlighted, capture groups listed, and get instant feedback on your pattern.
Pattern
Test String
How to use regex tester
- 1
Enter Pattern
Input your regular expression pattern in the regex field.
- 2
Input Test String
Type or paste your test text in the input editor.
- 3
Analyze
Review matches highlighted in real time, along with capture group values.
About the Regex Tester
Regular expressions are notoriously hard to write correctly on the first try, and even harder to read back a week later — a single misplaced quantifier or an unescaped special character can make a pattern match too much, too little, or throw a syntax error, and none of that is obvious just by staring at the pattern string.
This tester runs your pattern against live input as you type, highlighting every match in the text and listing out captured groups individually, so you can see exactly what a pattern like `(\d{3})-(\d{4})` is actually capturing rather than just whether it matched. It's most useful when writing a validation regex for a form field, debugging why a log-parsing pattern is missing some lines, or working out capture-group indices before hardcoding them into application code.
Frequently Asked Questions
Which regex flags are supported?
Global (g), Case-insensitive (i), Multiline (m), and Dotall (s) flags are available as toggles.
Are capture groups shown?
Yes. Each match card lists all numbered and named capture groups along with their matched values.
What happens with an invalid regex?
An inline error message describes exactly what is wrong with the pattern so you can fix it immediately.
Is my data sent to a server?
No. All regex matching runs entirely in your browser using the JavaScript RegExp engine. Nothing leaves your device.