Regular Expression Tool
Test and build regular expressions with real-time matching
Regular Expression Tool
Enter a regular expression and test text to see matches in real-time
No matches found
Email
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Matches valid email addresses
URL
^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$
Matches URLs with or without http(s) prefix
IPv4 Address
^(?:(?: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]?)$
Matches IPv4 addresses
Date (YYYY-MM-DD)
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$
Matches dates in YYYY-MM-DD format
Time (HH:MM:SS)
^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$
Matches times in HH:MM:SS or HH:MM format
Phone Number
^\+?[1-9]\d{1,14}$
Matches international phone numbers (E.164 format)
Strong Password
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$
Matches strong passwords (min 8 chars, at least one uppercase, lowercase, number, and special character)