Developer Tool
Regex Tester
Test and debug regular expressions against sample text. 100% client-side — no data is sent to any server.
/g/
💡 Current flags: g • Press Ctrl+Enter to run
🔒 All testing happens in your browser. No data is sent to any server.
How to use this Regex Tester
Testing regular expressions is simple with our free online tool. Enter your regex pattern in the pattern field and choose the appropriate flags. Then enter or paste some test text to search against.
Click Run or press Ctrl+Enter to see all matches found in the text. The result will show each match with its position and any capture groups. Use the common patterns or example texts to get started quickly.
What this regex tester does
- ✓Test regex patterns — Validate your regex patterns against sample text.
- ✓Support flags — Full support for all JavaScript regex flags.
- ✓Detailed results — Shows match index, matched string, and capture groups.
- ✓Common patterns — Quick access to common regex patterns like email, URL, phone.
- ✓100% client-side — All processing happens in your browser. No data is sent to servers.
- ✓No sign-up required — Completely free to use with no account needed.
Common Regex Patterns
Email
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}URL
https?:\/\/[\w\-\.]+\.[a-zA-Z]{2,}(?:\/[\w\-\.]*)*Phone (US)
\d{3}[-.]?\d{3}[-.]?\d{4}Hex Color
#[a-fA-F0-9]{6}\IP Address
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}Date (YYYY-MM-DD)
\d{4}-\d{2}-\d{2}💡 Pro Tips
- •Test incrementally — start with simple patterns and add complexity
- •Use flags wisely — 'g' for global search, 'i' for case-insensitive
- •Capture groups — use parentheses to extract specific parts of matches
- •Test edge cases — ensure your pattern works with unexpected inputs
