SyntaxSnap
Developer Resources

The Ultimate
Regex Cheatsheet.

Stop guessing patterns. Copy optimized regular expressions for your next project. Verified for JavaScript, Python, and Go.

Email Address

Validation
Test

Standard HTML5 email validation pattern.

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

Strong Password

Security
Test

Min 8 chars, 1 uppercase, 1 lowercase, 1 number, 1 special.

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

URL (Http/Https)

Web
Test

Matches standard web URLs with protocol.

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

Date (YYYY-MM-DD)

Data
Test

Matches ISO 8601 date format.

^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$

IPv4 Address

Network
Test

Matches standard IP address 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]?)$

Hex Color Code

Development
Test

Matches #FFF or #FFFFFF colors.

^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$

Need to debug a complex pattern?

Don't write regex blindly. Use our privacy-first Regex Tester to validate your strings locally.

Open Regex Tester

Popular Developer Tools