Regex Tester
Test and debug regular expressions with real-time matching, pattern explanations, and ReDoS vulnerability detection. Includes a library of common patterns.
Pattern is safe
Estimated complexity: O(n) - Linear
Max 64KB
No matches found
Pattern Breakdown
Common Patterns
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
URL
https?:\/\/[\w\-._~:/?#\[\]@!$&'()*+,;=]+
Phone (US)
\(?\d{3}\)?[-.]?\d{3}[-.]?\d{4}
Date (YYYY-MM-DD)
\d{4}-\d{2}-\d{2}
Time (HH:MM)
([01]?\d|2[0-3]):[0-5]\d
IP Address
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
Hex Color
#[0-9A-Fa-f]{6}
Username
[a-zA-Z][a-zA-Z0-9_]{2,15}
Export
Download results as PDF, CSV, or JSON.
Run the tool to enable exports.
What are Regular Expressions?
Regular expressions (regex) are powerful patterns used for matching, searching, and manipulating text. They're essential for data validation, text parsing, search-and-replace operations, and log analysis.
Pattern Matching
Find text that matches specific patterns like emails, phone numbers, URLs, or custom formats.
Pattern Explanation
Understand complex patterns with our breakdown feature that explains each token in your regex.
Security Analysis
Detect ReDoS (Regular Expression Denial of Service) vulnerabilities before deploying to production.
Common Use Cases
Data Validation
- Email address validation
- Phone number formatting
- Password strength requirements
- Credit card number patterns
Text Processing
- Log file parsing
- URL extraction from text
- Search and replace operations
- Data extraction and transformation
Security Note: ReDoS Protection
This tool automatically analyzes your patterns for ReDoS vulnerabilities. Patterns that could cause exponential backtracking are flagged with warnings and alternative safe patterns are suggested. Always test regex patterns before using them in production systems.