Regex Tester

Test a regular expression against sample text and see all matches, positions, and capture group contents.

Frequently Asked Questions

Why does my pattern only find one match?

You're probably missing the g (global) flag. Without it, the engine stops after the first match. Add g to the flags field to find all matches.

What flags are supported?

Supported flags: g (global), i (case-insensitive), m (multiline), s (dotAll), u (Unicode), y (sticky), d (generate indices). Combine multiple flags like gi.

What is a capture group?

Parentheses in a regex create a capture group. The text matched by each group is extracted and reported separately, letting you pull out specific parts like the domain from an email address.

Is my text sent anywhere?

No. All matching runs entirely in your browser using the JavaScript RegExp engine. Your pattern and test text never leave your device.

What is catastrophic backtracking?

Certain patterns cause the engine to explore an exponentially large number of match paths. A pattern like (a+)+ on a string like 'aaaab' can freeze. Test performance-sensitive patterns carefully.

Important Disclaimer: Estimates for informational purposes only.

This calculator provides estimates for informational purposes only. Results are based on assumptions and may not reflect actual outcomes. Consult qualified professionals in relevant fields before making important decisions based on these results.