Regex Pattern Generator
Generate common regex patterns for email, phone, URL, IP, date, credit card, and more. Get ready-to-use regex with code examples for JavaScript, Python, and PHP.
Email Pattern
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}Matches standard email addresses
Example: user@example.com
JavaScript
const emailRegex = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g;
const isValid = emailRegex.test(input);Python
import re
email_regex = re.compile(r'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}')
is_valid = email_regex.match(input)PHP
$regex = '/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/';
$isValid = preg_match($regex, $input);Regex Syntax Reference
\\d Digit 0-9
\\w Word char
\\s Whitespace
. Any char
+ 1 or more
* 0 or more
? 0 or 1
{n} Exactly n
[abc] Set
[^abc] Not in set
^ Start
$ End