Explore, test, and discover regex patterns with our interactive tools. From email validation to complex parsing — find the perfect pattern.
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
const test = "[email protected]";
if (emailRegex.test(test)) {
// ✓ Valid email address
console.log("Match found!");
}
Test your regular expressions in real-time with instant visual feedback
Enter a regex pattern and test string to see matches
Visualization will appear when you enter a pattern
Most commonly used regex patterns, ready to copy and use
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Validates standard email format
https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)
Matches HTTP and HTTPS URLs
^(\+1)?[-.\s]?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$
US phone number formats
^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|3[47][0-9]{13})$
Visa, Mastercard, Amex
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$
Min 8 chars, upper, lower, number, special
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
ISO 8601 date format
^(?:(?: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]?)$
Valid IPv4 address
^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$
3 or 6 digit hex color codes
Master regular expressions from basics to advanced techniques
Learn the fundamental building blocks: literals, metacharacters, and simple patterns.
[abc].^ $Control how many times patterns match with quantifiers and repetition.
*+{n,m}Group patterns together and capture matched content for extraction.
()(?:)(?<name>)Advanced assertions for complex pattern matching scenarios.
(?=)(?!)(?<=) (?<!)