Regex Tester — Regular expressions are powerful but easy to get wrong. This tester shows you exactly what your pattern matches as you type, highlighting every match in your test text and listing capture groups so you can verify the pattern before you ship it.
Your pattern and test text are processed entirely in your browser and never uploaded.
Was Regex Tester useful?
What is Regex Tester?
Regular expressions are powerful but easy to get wrong. This tester shows you exactly what your pattern matches as you type, highlighting every match in your test text and listing capture groups so you can verify the pattern before you ship it.
Everything runs locally with the browser’s native regex engine, so patterns and sample data never leave the page — fine for testing against real user data, logs, or anything sensitive.
How to use it
-
Type your pattern
For example: \b\w+@\w+\.\w+ to match email addresses.
-
Toggle flags
Case-insensitive, multiline, dot-all, Unicode, and sticky modes.
-
Enter test text
Every match is highlighted and listed with its capture groups.
Examples
Find email addresses
A simple pattern that finds email-like strings in a block of text.
\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b Result: All email addresses in the test text, highlighted with capture groups shown.
Frequently asked questions
Related guides
What Is Regex, and When Should You Actually Use It?
Learn the core regular expression operators, capture groups, flavor differences, and four signs a proper parser is safer than regex.
How to Validate an Email Address Without Sending One
Understand the three layers of email validation—syntax, DNS MX lookup, and mailbox confirmation—plus regex edge cases and offline browser checks.
How to Minify HTML, CSS, and JS Without Breaking Your Site
Minify HTML, CSS, and JavaScript safely to cut payload size 20–60%, pair minification with Gzip/Brotli, and debug using source maps.