Test regular expressions with real-time matching and highlighting
Tip: Patterns with nested quantifiers like (a+)+ may cause slow matching on certain inputs. This is a known regex behavior called catastrophic backtracking.
Enter your regex pattern
Type your regular expression pattern in the pattern input field.
Add test text
Enter the text you want to test your regex against in the test area.
View matches
See highlighted matches and capture groups displayed in real-time.
Paste your regular expression into the pattern field, enter your test string below, and see matches highlighted in real-time. The tool shows all matches, capture groups, and their positions. It uses JavaScript's native RegExp engine and supports all standard flags (g, i, m, s).
Yes, the regex tester is completely free with no usage limits. All pattern matching happens locally in your browser using JavaScript's native RegExp engine. Your test strings and patterns are never sent to any server, making it safe to test patterns against sensitive data.
The global (g) flag finds all matches instead of stopping at the first. Case insensitive (i) ignores letter case. Multiline (m) makes ^ and $ match line starts/ends, not just string boundaries. Dot-all (s) makes the dot (.) also match newline characters.
Common patterns: email matching uses [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}, URLs use https?://[^\s]+, phone numbers use \d{3}[-.]?\d{3}[-.]?\d{4}, and IP addresses use \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}. Paste any of these into the tester to see them in action.