Regex Tester
Test and debug regular expressions with real-time matching, group capture, and cheat sheet.
What regex syntax does this tool support?
This tool supports JavaScript regular expression syntax, which is widely used in web development. It supports flags like g (global), i (case-insensitive), m (multiline), s (dotAll), and u (unicode).
How do I capture groups in my regex?
Use parentheses () to create capture groups. Matched groups are displayed below the results. For example, (\d+)-(\d+) will capture two number groups separated by a hyphen.
What are regex flags?
Flags modify how the regex engine searches. g = global (find all matches), i = case-insensitive, m = multiline (^ and $ match line boundaries), s = dotAll (. matches newlines), u = unicode mode.
Why is my regex not matching?
Common issues include: missing escape characters for special chars like . * + ?, incorrect anchors, or wrong flag settings. Check the error message displayed below the pattern input for syntax errors.