Regexy

Email Validator

Validates email addresses

email
validation
string
/^[\w.-]+@[a-zA-Z\d.-]+\.[a-zA-Z]{2,}$/

Phone Number (US)

Matches US phone numbers

phone
validation
us
/^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/

URL Validator

Validates HTTP/HTTPS URLs

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

IPv4 Address

Matches IPv4 addresses

ip
network
validation
/^(?:(?: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]?)$/

Credit Card Number

Matches credit card numbers

credit-card
payment
validation
/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|3[47][0-9]{13}|3[0-9]{13}|6(?:011|5[0-9]{2})[0-9]{12})$/

Hexadecimal Color

Matches hex color codes

color
hex
css
/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/

Strong Password

Password with uppercase, lowercase, digit, special char, 8+ chars

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

Date (MM/DD/YYYY)

Matches US date format

date
validation
format
/^(0[1-9]|1[0-2])\/(0[1-9]|[12][0-9]|3[01])\/(19|20)\d\d$/

Social Security Number

Matches US SSN format

ssn
validation
us
/^\d{3}-\d{2}-\d{4}$/

ZIP Code

Matches US ZIP codes (5 or 9 digits)

zip
postal
us
/^\d{5}(-\d{4})?$/

Username

Alphanumeric username, 3-16 characters

username
validation
alphanumeric
/^[a-zA-Z0-9_]{3,16}$/

HTML Tag

Matches HTML tags

html
tag
markup
/<\/?[a-zA-Z][^>]*>/

MAC Address

Matches MAC addresses

mac
network
hardware
/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/

File Extension

Extracts file extension

file
extension
path
/\.([a-zA-Z0-9]+)$/

Whitespace

Matches any whitespace character

whitespace
space
cleanup
/\s+/

Word Boundaries

Matches whole words only

word
boundary
search
/\bword\b/

Numbers Only

Matches strings containing only numbers

number
digit
validation
/^\d+$/

Letters Only

Matches strings containing only letters

letter
alpha
validation
/^[a-zA-Z]+$/

Alphanumeric

Matches alphanumeric strings

alphanumeric
validation
string
/^[a-zA-Z0-9]+$/

Floating Point Number

Matches decimal numbers

number
decimal
float
/^-?\d+(\.\d+)?$/

Time (24-hour)

Matches 24-hour time format

time
24-hour
validation
/^([01]?[0-9]|2[0-3]):[0-5][0-9]$/

Time (12-hour)

Matches 12-hour time format with AM/PM

time
12-hour
am-pm
/^(1[0-2]|0?[1-9]):[0-5][0-9] (AM|PM)$/

UUID

Matches UUID format

uuid
identifier
validation
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/

Base64

Matches Base64 encoded strings

base64
encoding
validation
/^[A-Za-z0-9+/]*={0,2}$/

JSON String

Matches JSON string values

json
string
parsing
/"([^"\\]|\\.)*"/

Markdown Link

Matches Markdown link syntax

markdown
link
syntax
/\[([^\]]+)\]\(([^)]+)\)/

CSS Property

Matches CSS property declarations

css
property
style
/([a-zA-Z-]+)\s*:\s*([^;]+);?/

SQL Injection

Detects potential SQL injection patterns

sql
security
injection
/(\b(SELECT|INSERT|UPDATE|DELETE|DROP|CREATE|ALTER)\b)/

Camel Case

Matches camelCase strings

camelcase
naming
convention
/^[a-z]+([A-Z][a-z]*)*$/

Pascal Case

Matches PascalCase strings

pascalcase
naming
convention
/^[A-Z][a-z]*([A-Z][a-z]*)*$/

Snake Case

Matches snake_case strings

snakecase
naming
convention
/^[a-z]+(_[a-z]+)*$/

Kebab Case

Matches kebab-case strings

kebabcase
naming
convention
/^[a-z]+(-[a-z]+)*$/

Version Number

Matches semantic version numbers

version
semver
validation
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/

Git Commit Hash

Matches Git commit hashes

git
commit
hash
/^[a-f0-9]{7,40}$/

Docker Image Tag

Matches Docker image tags

docker
image
tag
/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/

JWT Token

Matches JWT token structure

jwt
token
auth
/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/

Emoji

Matches emoji characters

emoji
unicode
character
/[\u{1F600}-\u{1F64F}]|[\u{1F300}-\u{1F5FF}]|[\u{1F680}-\u{1F6FF}]|[\u{1F1E0}-\u{1F1FF}]/

Hashtag

Matches social media hashtags

hashtag
social
media
/#[a-zA-Z0-9_]+/

Mention

Matches social media mentions

mention
social
media
/@[a-zA-Z0-9_]+/

Currency

Matches currency amounts

currency
money
validation
/^\$?\d{1,3}(,\d{3})*(\.\d{2})?$/

Percentage

Matches percentage values

percentage
number
validation
/^\d{1,3}(\.\d+)?%$/

Binary Number

Matches binary numbers

binary
number
base2
/^[01]+$/

Octal Number

Matches octal numbers

octal
number
base8
/^[0-7]+$/

Hexadecimal Number

Matches hexadecimal numbers

hex
number
base16
/^[0-9A-Fa-f]+$/

Roman Numerals

Matches Roman numerals

roman
numerals
validation
/^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/

GUID

Matches GUID format

guid
identifier
microsoft
/^\{?[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}\}?$/

ISBN

Matches ISBN-10 and ISBN-13

isbn
book
validation
/^(?:ISBN(?:-1[03])?:? )?(?=[0-9X]{10}$|(?=(?:[0-9]+[- ]){3})[- 0-9X]{13}$|97[89][0-9]{10}$|(?=(?:[0-9]+[- ]){4})[- 0-9]{17}$)(?:97[89][- ]?)?[0-9]{1,5}[- ]?[0-9]+[- ]?[0-9]+[- ]?[0-9X]$/

Latitude/Longitude

Matches GPS coordinates

gps
coordinates
location
/^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/

IBAN

Matches International Bank Account Number

iban
bank
international
/^[A-Z]{2}[0-9]{2}[A-Z0-9]{4}[0-9]{7}([A-Z0-9]?){0,16}$/

Markdown Image

Matches Markdown image syntax

markdown
image
syntax
/!\[([^\]]*)\]\(([^)]+)\)/
Bolt.new logo