Regex Tester
Test regular expressions live with match highlighting and capture group extraction.
//g
Flags:
Example Patterns
Other Utilities
Regular Expression Basics
Regular expressions (regex) are powerful patterns for matching, searching, and manipulating text. They are supported in JavaScript, Python, Java, and most modern programming languages.
Common Patterns
| Use Case | Pattern |
|---|---|
[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,} | |
| URL | https?://[\w\-]+(\.[\w\-]+)+ |
| Date (YYYY-MM-DD) | \d{4}-\d{2}-\d{2} |
| Hex color | #([a-fA-F0-9]{6}|[a-fA-F0-9]{3})\b |
Flags Explained
- g (global): Find all matches, not just the first one
- i (ignoreCase): Case-insensitive matching
- m (multiline):
^and$match start/end of each line - s (dotAll):
.matches newline characters as well


