Regex Tester

Test and validate regular expressions with real-time matching and explanations

Regular Expression Pattern

Flags: g (global), i (ignore case), m (multiline), s (dotall), u (unicode), y (sticky)
Valid Pattern
2 matches

Test String

Test Results

Highlighted Matches

Contact us at [email protected] or [email protected] for help.

Match Details

Match 1
Position: 14
Full Match: "[email protected]"
Match 2
Position: 34
Full Match: "[email protected]"

Common Regex Patterns

Email

Matches email addresses

\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b

URL

Matches HTTP/HTTPS URLs

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

Phone Number

Matches US phone numbers

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

Date (YYYY-MM-DD)

Matches dates in YYYY-MM-DD format

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

IPv4 Address

Matches IPv4 addresses

\b(?:(?: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]?)\b

Hex Color

Matches hex color codes

#[a-fA-F0-9]{6}|#[a-fA-F0-9]{3}

Features

• Real-time pattern validation
• Match highlighting
• Capture group details
• Named group support
• Common pattern library
• Flag support (g, i, m, s, u, y)
• Match position tracking
• Copy matches functionality
• Sample text loading

We use cookies and similar technologies to improve your experience and to show ads from Google and other partners. You can accept or reject non-essential cookies. See our Privacy Policy for details.

For users in the EEA/UK, Google requires using a Google-certified Consent Management Platform (CMP). This basic banner is a placeholder; integrate a certified CMP to fully comply.