Back to AI Tools

Regular Expression Tester

Test and debug regex patterns with live highlighting, match results, and capture groups

Quick Patterns

📧 Email Address

^[\\w.-]+@[\\w.-]+\\.\\w+$

Validates email format

🔗 URL / Website

https?://[\\w.-]+\\.[\\w.]+

Matches web URLs

📞 Phone (US)

\\d{3}[-.]?\\d{3}[-.]?\\d{4}

US phone format

📱 Phone (International)

\\+?\\d{1,4}[\\s.-]?\\(?\\d+\\)?[\\s.-]?\\d+

International format

🎨 Hex Color

#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})

Matches hex colors

🌐 IPv4 Address

\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\b

IPv4 format

🌍 IPv6 Address

([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}

IPv6 format

📅 Date (ISO)

\\d{4}-\\d{2}-\\d{2}

YYYY-MM-DD format

📆 Date (US)

\\d{1,2}/\\d{1,2}/\\d{4}

MM/DD/YYYY format

🕐 Time (24h)

([01]?[0-9]|2[0-3]):[0-5][0-9]

HH:MM format

🕑 Time (12h)

\\d{1,2}:\\d{2}\\s?(AM|PM|am|pm)

12-hour with AM/PM

👤 Username

^[a-zA-Z0-9_-]{3,16}$

3-16 alphanumeric

🔒 Strong Password

^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).{8,}$

8+ chars with cases

💳 Credit Card

\\d{4}[\\s-]?\\d{4}[\\s-]?\\d{4}[\\s-]?\\d{4}

16-digit card number

🆔 SSN

\\d{3}-\\d{2}-\\d{4}

Social Security Number

📮 ZIP Code

\\d{5}(-\\d{4})?

US ZIP or ZIP+4

🏷️ HTML Tag

<([a-z]+)([^<>]*)>

Opening HTML tags

🖧 MAC Address

([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}

Network MAC address

🌐 Domain Name

^[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]\\.[a-zA-Z]{2,}$

Valid domain names

🔗 URL Slug

^[a-z0-9]+(?:-[a-z0-9]+)*$

SEO-friendly URLs

📝 Markdown Link

\\[([^\\]]+)\\]\\(([^\\)]+)\\)

Markdown [text](url)

#️⃣ Hashtag

#[a-zA-Z0-9_]+

Social media hashtags

@ Mention

@[a-zA-Z0-9_]+

Social media @mentions

🔢 Number

-?\\d+(\\.\\d+)?

Integer or decimal

Popular Tags

RegEx Tester Pattern Matcher Free Tool Regular Expression Text Processing Pattern Validation Online Tool Web Development