Regular Expression Tester
Test and debug regular expressions against any text. Highlights all matches, shows capture groups and flags. JavaScript regex engine. Free.
How to use the Regex Tester
JavaScript regex engine
Enter your pattern without the surrounding /slashes/. Use flags: g (find all), i (case insensitive), m (multiline — ^ and $ match line starts/ends), s (dot matches newlines). All matches are highlighted inline in the test string.
Common patterns
Email: [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,} — URL: https?://\S+ — UK postcode: [A-Z]{1,2}\d[A-Z\d]? ?\d[A-Z]{2} — 5-digit ZIP: \d{5} — any word 5+ letters: [a-zA-Z]{5,}
Regular expressions were invented by mathematician Stephen Cole Kleene in 1951 — long before computers were widely available. The original concept was about formal languages, not text searching. Modern 'regex' is a much more expansive (and less mathematically pure) descendant.
Frequently asked questions
Is the Regex Tester free to use?
Yes, the Regex Tester is completely free. There is no sign-up, no account required, and no limit on how often you can use it.
Is my text private when using the Regex Tester?
Yes, all text processing happens in your browser. Your text is not sent to any server and is not stored anywhere outside your device.
What devices does the Regex Tester work on?
The Regex Tester works on any device with a modern web browser — desktop, laptop, tablet, or phone. It is mobile-friendly and works offline once the page has loaded.