Regex Tester

Test regular expressions with real-time matching, capture groups, and flag options.

Processed locally in your browser
//
Test String

Frequently Asked Questions

What do the regex flags (g, i, m, s) mean?
g (global) finds all matches, i (case insensitive) ignores letter casing, m (multiline) makes ^ and $ match line starts/ends, and s (dotall) makes the dot (.) match newline characters as well.
What are capture groups in regex?
Capture groups are parts of a pattern enclosed in parentheses, e.g., (\d+). They let you extract specific portions of a match, which this tool displays in the Match Details panel.
Why does my regex cause an infinite loop?
This usually happens when a global regex matches an empty string (e.g., pattern "a*"). This tool automatically advances past empty matches to prevent infinite loops.
Does this regex tester work with all programming languages?
This tool uses JavaScript regular expression syntax. Most basic patterns work across languages, but advanced features like lookbehinds or named groups may differ in Python, Java, or other languages.