Want the full library?

๐Ÿ›ก๏ธ

You've reached the free limit for pattern imports. Join our curated beta preview to unlock unlimited patterns and AI features.

Join the Beta Preview

Regex Library

A curated collection of common regular expressions. Search, test, and add them directly to RegexPilot with one click.

๐Ÿ”

Email (standard)

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

Test: user@example.com, john.doe@company.co.uk

Add to RegexPilot

Email (strict RFC 5322)

validation
[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*

Test: user@example.com, first.last@sub.domain.org

Add to RegexPilot

URL (HTTP/HTTPS)

web
https?://(?:www\.)?[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[a-zA-Z]{2,}(?:/[^\s]*)?

Test: https://example.com, http://www.google.com/search

Add to RegexPilot

Domain name

web
(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}

Test: example.com, sub.domain.co.uk

Add to RegexPilot

URL slug

web
^[a-z0-9]+(?:-[a-z0-9]+)*$

Test: my-blog-post, simple-slug

Add to RegexPilot

IPv4 address

network
(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.(?:25[0-5]|2[0-4]\d|[01]?\d\d?)

Test: 192.168.1.1, 10.0.0.255

Add to RegexPilot

IPv4 with port

network
(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.(?:25[0-5]|2[0-4]\d|[01]?\d\d?):\d{1,5}

Test: 192.168.1.1:8080, 10.0.0.1:443

Add to RegexPilot

International phone

validation
\+?\d{1,3}[-.\s]?\(?\d{1,4}\)?[-.\s]?\d{1,4}[-.\s]?\d{1,9}

Test: +1 (555) 123-4567, +44 20 7946 0958

Add to RegexPilot

US phone number

validation
\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}

Test: (555) 123-4567, 555-123-4567

Add to RegexPilot

Date YYYY-MM-DD

date
\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])

Test: 2024-01-15, 2023-12-31

Add to RegexPilot

Date DD/MM/YYYY

date
(?:0[1-9]|[12]\d|3[01])/(?:0[1-9]|1[0-2])/\d{4}

Test: 15/01/2024, 31/12/2023

Add to RegexPilot

ISO 8601 datetime

date
\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})

Test: 2024-01-15T10:30:00Z

Add to RegexPilot

Time 24-hour

date
(?:[01]\d|2[0-3]):[0-5]\d

Test: 09:30, 23:59, 14:45

Add to RegexPilot

Time 12-hour

date
(?:0?[1-9]|1[0-2]):[0-5]\d\s?(?:AM|PM)

Test: 9:30 AM, 12:00 PM

Add to RegexPilot

Integer

number
^-?\d+$

Test: 42, -7, 0

Add to RegexPilot

Decimal number

number
^-?\d*\.\d+$

Test: 3.14, -0.5, .25

Add to RegexPilot

Currency (USD)

number
\$\d{1,3}(?:,\d{3})*(?:\.\d{2})?

Test: $1,234.56, $99.99

Add to RegexPilot

Percentage

number
\d+(?:\.\d+)?%

Test: 100%, 3.14%, 50%

Add to RegexPilot

UUID v4

validation
[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}

Test: 550e8400-e29b-41d4-a716-446655440000

Add to RegexPilot

Credit card number

numbersecurity
\d{4}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}

Test: 4111-1111-1111-1111

Add to RegexPilot

Strong password

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

Test: Passw0rd!, MyP@ss1

Add to RegexPilot

HTML tag

web
<\/?[a-zA-Z][a-zA-Z0-9]*(?:\s[^>]*)?\/?>

Test: <div>, <p class="text">, </span>

Add to RegexPilot

Hex color code

web
#(?:[0-9a-fA-F]{3}){1,2}\b

Test: #fff, #FF5733, #000000

Add to RegexPilot

CSS class selector

web
\.[a-zA-Z_][a-zA-Z0-9_-]*

Test: .container, .my-class, ._private

Add to RegexPilot

Markdown link

web
\[([^\]]+)\]\(([^)]+)\)

Test: [click here](https://example.com)

Add to RegexPilot

Duplicate words

text
\b(\w+)\s+\1\b

Test: the the quick brown fox

Add to RegexPilot

Leading/trailing whitespace

text
^\s+|\s+$

Test: hello , world

Add to RegexPilot

Multiple spaces

text
\s{2,}

Test: too many spaces

Add to RegexPilot

Username (3-16 chars)

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

Test: john_doe, user-123

Add to RegexPilot

Unix file path

file
(?:/[a-zA-Z0-9._-]+)+

Test: /usr/local/bin, /home/user/.config

Add to RegexPilot

Windows file path

file
[a-zA-Z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*

Test: C:\Users\Admin\file.txt

Add to RegexPilot

File extension

file
\.[a-zA-Z0-9]{1,10}$

Test: document.pdf, image.png

Add to RegexPilot