Regex Tester
Test regular expressions with real-time matching, flags, and replace mode.
/
/
Flags:
Replace Mode
About This Tool
Regular expressions (regex) are patterns used to match character combinations in strings. This tester helps you build and debug regex patterns with real-time feedback, showing all matches highlighted in the test string.
Common Use Cases
- Validating email addresses, phone numbers, URLs
- Extracting data from text (parsing logs, scraping)
- Search and replace operations
- Form input validation
- Text processing and manipulation
Examples
Common patterns:
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}- Email\d{3}[-.]?\d{3}[-.]?\d{4}- Phone (US)https?://[^\s]+- URLs\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b- IP address
Notes & Limitations
- JavaScript regex syntax is used (may differ slightly from other languages)
- Use
\to escape special characters:. * + ? ^ $ { } [ ] \ | ( ) - Capture groups use parentheses:
(\d+) - Use
$1,$2, etc. in replacement for captured groups
Privacy Note
All regex testing is performed client-side in your browser. Your patterns and test strings are never sent to any server.