Test regular expressions with real-time matching, group highlighting, and a cheat sheet.
Regex flags modify how a pattern is matched. Common flags include: g (global - find all matches), i (case-insensitive), m (multiline - ^ and $ match line boundaries), and s (dotAll - dot matches newlines).
Wrap part of your pattern in parentheses to create a capture group. For example, (\d+)-(\d+) captures two groups of digits separated by a dash. Named groups use the syntax (?<name>pattern).
Yes. Matches are highlighted instantly as you type both the pattern and test string. No button click needed for matching — results update automatically.
This tool uses the JavaScript RegExp engine built into your browser. It supports ES2024 features including named groups, lookbehind assertions, and Unicode property escapes.
Open the Cheat Sheet section for common patterns including email, URL, IP address, and phone number validation. Click any pattern to try it, then paste your test data to verify matches.