Regex Playground

Test and experiment with regular expressions in real-time

Regular Expression
Pattern: No pattern entered
/g

Find all matches

Case insensitive

^$ match line breaks

. matches newlines

Unicode matching

Match from lastIndex

Test String
Results

Enter a regex pattern and test string to see results

Examples & Templates

Email Address

Matches most common email address formats

[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}

URL/Link

Matches HTTP and HTTPS URLs

https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)

Phone Number (US)

Matches US phone numbers with optional parentheses and separators

\(?([0-9]{3})\)?[-\s]?([0-9]{3})[-\s]?([0-9]{4})