Write and test regex patterns with instant match highlighting. Great for form validation, log parsing, and text extraction. Fully client-side—no data sent anywhere.
$& = full match, $1 $2 = capture groups. Runs entirely in your browser.
Enter a pattern to see token explanations.
No saved regexes. Saves stay in your browser (localStorage).
The Regex Tester is a powerful online tool for testing and debugging regular expressions. It provides real-time pattern matching, match highlighting, and supports all JavaScript regex flags. Perfect for developers who need to validate patterns, extract data, or learn regex syntax.
Explore these related free tools to enhance your productivity and workflow.
Enter your regex pattern in the pattern field and your test string in the test string field. The tool will automatically highlight matches and show match details. You can adjust flags like global, case-insensitive, and multiline to customize the matching behavior.
The tool supports all standard JavaScript regex flags: global (g) for multiple matches, ignoreCase (i) for case-insensitive matching, multiline (m) for ^ and $ matching line boundaries, dotAll (s) for . matching newlines, unicode (u) for Unicode support, and sticky (y) for matching at lastIndex.
Yes! Click on any pattern from the 'Common Patterns' library to load it instantly. Patterns include email validation, URL matching, phone numbers, dates, IP addresses, and more. You can then modify them or use them as-is.
Yes! Our regex tester is 100% free with no registration required, no usage limits, and no hidden fees. You can test as many patterns as you need for your development work.
No, all regex testing happens locally in your browser. We don't store, save, or have access to any patterns or test strings you use. Your privacy is completely protected.
The tool supports all JavaScript regex features including character classes, quantifiers, groups, lookaheads, lookbehinds, and all standard flags. It uses the native JavaScript RegExp engine, so any valid JavaScript regex will work.
Use the email pattern from the Common Patterns library: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$. This pattern validates most standard email formats. You can test it against sample email addresses to see how it works.
Yes! The tool includes a pre-built URL pattern that matches HTTP and HTTPS URLs. Load it from the Common Patterns library and test it against various URL formats to see how it matches different URL structures.
Global (g) flag finds all matches in the text, while without it, only the first match is found. Use global when you need to find multiple occurrences of a pattern in your text, such as finding all email addresses in a document.
Capture groups are created using parentheses () in your pattern. They allow you to extract specific parts of a match. The tool displays all capture groups in the match details, showing what each group captured from your test string.
Yes! The Common Patterns library includes a US phone number pattern. You can modify it for international formats or create your own pattern. Test it with various phone number formats to ensure it matches correctly.
Absolutely! The tool is perfect for learning regex. Start with common patterns, see how they match text, experiment with flags, and observe the results. The real-time highlighting and match details help you understand how regex patterns work.
Enter your regex pattern and test string. Use the replacement field (when available) with $& for the full match and $1, $2, etc. for capture groups. All processing runs in your browser—nothing is sent to any server.
No. This regex tester runs entirely in your browser. Your pattern, test string, and any replacement never leave your device. No upload, no tracking, no backend—your privacy is protected.