Test and debug your regular expressions in real time. Our regex tester provides instant matching, pattern explanation, and a library of 25+ common patterns — all running 100% in your browser. No data is sent to any server.
Real-time matching — See matches highlighted as you type. Supports global, case-insensitive, multiline, and dotall flags.
Pattern explanation — Click "Explain" to see a token-by-token breakdown of your regex in plain English. Great for learning and debugging.
Find & Replace — Test regex replacements with backreferences ($1, $2) before using them in your code.
Pattern Library — Browse 25+ pre-built patterns for email, URL, IP addresses, dates, UUID, JWT, credit cards, and more.
| Pattern | Description |
|---|---|
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,} | Email address |
https?://[^\s]+ | URL |
\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b | IPv4 address |
\d{4}-\d{2}-\d{2} | ISO date |
#[0-9a-fA-F]{3,6}\b | Hex color |
| Token | Meaning |
|---|---|
. | Any character (except newline) |
\d | Digit [0-9] |
\w | Word character [a-zA-Z0-9_] |
\s | Whitespace |
^ / $ | Start / End of line |
* | 0 or more |
+ | 1 or more |
? | 0 or 1 (optional) |
{n,m} | Between n and m times |
(abc) | Capture group |
(?:abc) | Non-capturing group |
a|b | a OR b |
[abc] | Any of a, b, c |
[^abc] | Not a, b, or c |
(?=abc) | Lookahead |
(?<=abc) | Lookbehind |
Regular expressions are powerful but can be tricky to get right. This tool lets you iterate quickly — see matches in real time, understand what each token does, and test replacements before committing to code. Works with JavaScript regex syntax.