Test and debug regular expressions with live matching, highlighting, and common pattern examples.
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
Matches most email address formats
https?://(?:[-\w.])+(?:\:[0-9]+)?(?:/(?:[\w/_.])*)?(?:\?(?:[\w&=%.])*)?(?:\#(?:[\w.])*)?
Matches HTTP and HTTPS URLs
^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$
Matches US phone number formats
^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
Matches IPv4 addresses
^(0[1-9]|1[0-2])\/(0[1-9]|[12][0-9]|3[01])\/\d{4}$
Matches MM/DD/YYYY date format
^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$
Matches hex color codes
.
Matches any character except newline
*
Matches 0 or more of the preceding character
+
Matches 1 or more of the preceding character
?
Matches 0 or 1 of the preceding character
^
Matches start of string
$
Matches end of string
[]
Character class - matches any character inside
()
Capturing group
|
Alternation (OR)
\d
Matches any digit (0-9)
\w
Matches any word character (a-z, A-Z, 0-9, _)
\s
Matches any whitespace character