Regex Tester & Debugger
Test and debug regular expressions with real-time matching, explanations, and common patterns. Perfect for developers, data analysts, and anyone working with pattern matching.
Enter test string above to see matches highlighted here...
How to Use the Regex Tester
Step-by-Step Guide
- Enter your regular expression pattern in the pattern field
- Select appropriate flags (Global, Ignore Case, Multiline, Single Line)
- Input test text in the test string area
- See real-time highlighting of matches in the results area
- Review detailed match information in the table below
- Use common patterns as starting points for your own regex
💡 Pro Tips
- Use the global flag (g) to find all matches
- Case insensitive flag (i) ignores upper/lowercase
- Test with edge cases and boundary conditions
- Use capturing groups () to extract specific parts
⚠️ Common Gotchas
- Escape special characters with backslashes
- Use double backslashes in strings: \\d instead of \d
- Test multiline patterns with actual line breaks
- Remember that . doesn't match newlines by default
Regex Examples
Email Validation
Pattern:
[\w.-]+@[\w.-]+\.[a-zA-Z]{2,}
Test String:
Contact us at support@example.com or admin@test.org
Phone Numbers
Pattern:
^(\+\d{1,3}[- ]?)?\d{10}$
Test String:
+1-555-123-4567
555-987-6543
+44 20 7946 0958