Regex Tester
Test and debug regular expressions with live matching and explanations.
Test Regular Expression
Enter your regex pattern and test string to see live matches
//
Pattern Explanation
What each part of your regex means
Enter a pattern to see explanations.
Common Patterns
^d{3}-d{3}-d{4}$
Phone number (xxx-xxx-xxxx)
^[\w.-]+@[\w.-]+\.\w{2,}$
Email address
^https?://[\w.-]+
URL starting with http/https
^#[0-9A-Fa-f]{6}$
Hex color code
\b[A-Z][a-z]+\b
Capitalized words
Quick reference:
\d = digit • \w = word char • \s = whitespace • . = any char
^ = start • $ = end • * = 0+ • + = 1+ • ? = 0 or 1