About this tool
A searchable collection of practical regular expressions for validating input and cleaning text, each with a short explanation of what it accepts and where it falls short. Every pattern comes with sample values you can edit to see what passes and what fails before you copy it as a plain pattern or a JavaScript /…/ literal. The patterns are kept deliberately readable rather than trying to cover every edge case of the underlying standards.
How to use Regex Patterns
- Search or filter by category.
- Read the note to check the pattern fits your case.
- Press Test it and edit the sample values.
- Copy the pattern or the /…/ literal.
Frequently asked questions
Is the email pattern fully RFC 5322 compliant?
No, on purpose. A fully compliant pattern is huge and accepts addresses no one uses. The practical pattern catches typos, and sending a confirmation email is the real test.
Do these work outside JavaScript?
Most do, in PCRE, Python, Java and .NET. Patterns that use \p{…} Unicode classes or lookbehind may need adjusting in older engines.
Does the date pattern check for 31 February?
No. Regex checks the shape of a date. Parse the value with a date library to catch impossible days.