4 min read
Regex Cheatsheet: Email, Password, PAN, Aadhaar & GST
Ready-to-copy regular expressions for email, strong passwords, phone numbers, PAN, Aadhaar and GSTIN — plus a free tool to build and test your own.
Writing a validation regex by hand is easy to get wrong. Here are battle-tested patterns you can copy for the most common form fields — and a tool to test them and build your own without memorising syntax.
Common patterns
- Email — ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
- Strong password — at least 8 chars with upper, lower, digit and symbol.
- PAN (India) — ^[A-Z]{5}[0-9]{4}[A-Z]$
- GSTIN (India) — a 15-character format check.
- Indian mobile — ^(\+91)?[6-9]\d{9}$
These validate the format (the shape of the value), not real checksums — an Aadhaar or GST pattern confirms the structure, not that the ID exists.
Try the Regex GeneratorReady-made regex for email, password, phone, PAN, Aadhaar, GST and more — copy instantly, or build your own without writing regex by hand.Build your own without knowing regex
The Regex Generator also has a visual builder: tick the character types and length you want, and it writes the pattern for you, ready to copy and test live.