Regex Tester
Test regular expressions with real-time matching and highlighting. Uses JavaScript regex engine.
/
/
Common Regex Patterns
| Pattern | Description | Example Match |
|---|---|---|
[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z]{2,} | Email address | user@example.com |
https?://[^\s]+ | URL | https://example.com |
\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b | IPv4 address | 192.168.1.1 |
^\d{4}-\d{2}-\d{2}$ | Date (YYYY-MM-DD) | 2026-01-15 |
^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$ | Hex color | #ff5733 |
Regex Quick Reference
| Token | Description |
|---|---|
. | Any character except newline |
\d | Digit [0-9] |
\w | Word character [a-zA-Z0-9_] |
\s | Whitespace |
* | 0 or more |
+ | 1 or more |
? | 0 or 1 |
{n,m} | Between n and m times |
^ | Start of string/line |
$ | End of string/line |
(abc) | Capture group |
[abc] | Character class |
a|b | Alternation (a or b) |