Regex Tester

Test regular expressions online for free. Real-time matching with highlighting, capture groups, and flag support.

//

Frequently Asked Questions

How do I test a regular expression?

Enter your regex pattern (like /[a-z]+/g) in the pattern field, type or paste your test text below, and matches appear instantly highlighted. The tool shows match position, matched text, and capture groups.

What do the regex flags g, i, m mean?

g = global (find all matches, not just the first). i = case-insensitive. m = multiline (^ and $ match line starts/ends). Combine them: "gim" for all three.

Why is my regex not matching?

Common issues: forgetting to escape special characters (use \ before . * + ? [ ] ( ) { } | ^ $), wrong flags, or mismatched parentheses. The tool shows error messages to help debug.