Visual Builder
Any Character
.
Digit
\d
Word
\w
Whitespace
\s
Quantifier
+, *, ?
Group
( )
Character Class
[ ]
Start
^
End
$
OR
|
Word Boundary
\b
Lookaround
(?=)
Non-Digit
\D
Non-Word
\W
Non-Whitespace
\S
Tab
\t
Newline
\n
Number
[0-9]+
Letters
[a-zA-Z]+
1 or more
+
0 or more
*
0 or 1
?
Literal Dot
\.
Email
Quick
Phone
Quick
URL
Quick
IP Address
Quick
Pattern Explanation
Click "Explain" button to see a detailed breakdown of your regex pattern.
Test Your Pattern
Matches
0 matchesNo matches yet
Test Cases
Quick Reference
Character Classes
.
Any character except newline
\w
Word character [a-zA-Z0-9_]
\d
Digit [0-9]
\s
Whitespace character
[abc]
Character set (a, b, or c)
[^abc]
Negated set (not a, b, or c)
Quantifiers
*
0 or more
+
1 or more
?
0 or 1
{3}
Exactly 3
{2,5}
Between 2 and 5
{3,}
3 or more
Anchors
^
Start of string
$
End of string
\b
Word boundary
\B
Non-word boundary
Groups
(abc)
Capturing group
(?:abc)
Non-capturing group
(?=abc)
Positive lookahead
(?!abc)
Negative lookahead
Pattern Library
Email Validation
Basic Email
\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Z|a-z]{2,}\\b
Matches most common email formats
RFC 5322 Compliant
^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$
More strict email validation following RFC standards
Phone Numbers
US Phone Number
^(\\+?1-?)?\\(?([0-9]{3})\\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$
Matches US phone numbers in various formats
Programming
JavaScript Variable
^[a-zA-Z_$][a-zA-Z0-9_$]*$
Valid JavaScript variable name
Pattern Library
Email Validation
Basic Email
\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Z|a-z]{2,}\\b
Matches most common email formats
RFC 5322 Compliant
^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$
More strict email validation following RFC standards
Phone Numbers
US Phone Number
^(\\+?1-?)?\\(?([0-9]{3})\\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$
Matches US phone numbers in various formats
Turkish Phone Number
^(\\+90|0)?[0-9]{3}[0-9]{3}[0-9]{2}[0-9]{2}$
Matches Turkish mobile and landline numbers
URLs & Links
HTTP/HTTPS URL
https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)
Matches web URLs with optional www
Complete URL
^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&\\'\\(\\)\\*\\+,;=.]+$
Comprehensive URL pattern with protocol optional
Date & Time
Date DD/MM/YYYY
^(0[1-9]|[12][0-9]|3[01])[\\/\\-](0[1-9]|1[012])[\\/\\-]\\d{4}$
European date format with separators
24-Hour Time
^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$
24-hour time format HH:MM
Security & Validation
Strong Password
^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,}$
Requires uppercase, lowercase, digit, special char, min 8 chars
UUID
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Universally Unique Identifier format
Programming
JavaScript Variable
^[a-zA-Z_$][a-zA-Z0-9_$]*$
Valid JavaScript variable name
Number Literals
\\b(?:0[xX][0-9a-fA-F]+|0[bB][01]+|0[oO][0-7]+|\\d+)\\b
Hex, binary, octal, and decimal numbers