Regex Tester
Test regular expressions with real-time highlighting, capture groups, and detailed match statistics. All processing happens in your browser for maximum privacy.
Testing with:🟨 JavaScript
Enter a regex pattern and test string to get started, or load a sample pattern.
Keyboard Shortcuts
Ctrl+KClear AllCtrl+EnterTestCtrl+HHistory
⌨️ Keyboard Shortcuts
Clear AllCtrl+K
Test PatternCtrl+Enter
Copy PatternCtrl+Shift+C
Toggle HistoryCtrl+H
On Mac, use ⌘ (Cmd) instead of Ctrl
How to Use
Getting Started
- •Enter your regex pattern in the pattern field
 - •Add your test string in the test string field
 - •Results update automatically as you type
 - •Load sample patterns to see examples
 
Regex Flags
- gGlobal - Find all matches instead of just the first
 - mMultiline - ^ and $ match line breaks
 - iCase-insensitive - Ignore case when matching
 - uUnicode - Enable full Unicode support
 - sDotAll - Dot (.) matches newlines
 
Common Patterns
Email Address
 ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ URL
 https?://[^\s]+ Phone Number (US)
 \(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4}) Date (YYYY-MM-DD)
 \d{4}-\d{2}-\d{2}