Regex Tester
Test your regular expressions in real-time. See matches highlighted, verify capturing groups, and find errors quickly.
Enter a pattern and test string to see matches
- 1Enter your regex pattern
- 2Add test text to test the pattern
- 3See matches, groups and explanations in real-time
- Live Matching
See instantly which parts match as you write the pattern.
- Capture Groups
Shows all capturing groups and their values.
- Flags Support
Supports all flags: g (global), i (case-insensitive), m (multiline), s, u, y.
- Error Checking
Clear error messages for invalid regex.
What do the flags mean?
g = find all matches. i = ignore case. m = ^ and $ match line start/end. s = . matches newlines too.
How do I test email validation?
Use: /^[^\s@]+@[^\s@]+\.[^\s@]+$/ for simple validation. For full RFC compliance, regex is too complex.
What are Capturing Groups?
Parentheses () create groups you can extract. Example: /(\d{3})-(\d{4})/ matches '123-4567' and extracts '123' and '4567'.
Note: All processing happens in your browser. Your files are not uploaded to any server.