Regex Tester Online
Test regular expressions against text with real-time match highlighting online. Supports all JavaScript regex flags.
/
/
Common Patterns
| Pattern | Description |
|---|---|
[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z]{2,} | Email address |
https?://[^\s/$.?#].[^\s]* | URL |
\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b | IPv4 address |
\d{4}-\d{2}-\d{2} | Date (YYYY-MM-DD) |
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,}$ | Strong password |
#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})\b | HEX color |
How to test a regex pattern
- Enter your regex pattern in the pattern field above.
- Toggle flags — global (g), case-insensitive (i), multiline (m), dotAll (s), unicode (u).
- Paste your test string in the text area below.
- See matches highlighted in real-time with match count and capture group details.
Common regex patterns
- Email — [A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z]{2,}
- URL — https?://[^\s/$.?#].[^\s]*
- IP address — \b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b
- Date (YYYY-MM-DD) — \d{4}-\d{2}-\d{2}
- Thai text — [\u0E00-\u0E7F]+
- HEX color — #?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})\b
Need more tools?
Browse our collection of free developer tools.
Browse All Tools →