Nick's Regex Tool

Regular Expression Tool

Test, debug, and create your regex patterns with real-time matching, detailed results, and a comprehensive pattern library. Perfect for developers who work with regular expressions.

Pattern Library
Choose from common regex patterns. Use Pattern loads the regex, Try Example loads sample text.
Validation Mode: Patterns check if the entire string matches the format (perfect for form validation)

Email

Email & Communication

Validates if entire string is an email address

Example:
user@example.com

Email RFC 5322

Email & Communication

Comprehensive email validation (RFC 5322)

Example:
test.email+tag@example.co.uk

Phone US

Phone Numbers

Validates US phone number format

Example:
(555) 123-4567

Phone International

Phone Numbers

Validates international phone number (E.164)

Example:
+1234567890

URL HTTP/HTTPS

URLs & Web

Validates HTTP and HTTPS URLs

Example:
https://www.example.com/path?query=value

Domain Name

URLs & Web

Validates domain name format

Example:
example.com

IPv4 Address

URLs & Web

Validates IPv4 address format

Example:
192.168.1.1

Date YYYY-MM-DD

Dates & Time

Validates ISO date format

Example:
2023-12-25

Date MM/DD/YYYY

Dates & Time

Validates US date format

Example:
12/25/2023

Time 24-hour

Dates & Time

Validates 24-hour time format

Example:
14:30:00

Hex Color

Colors & Design

Validates hexadecimal color codes

Example:
#FF5733

RGB Color

Colors & Design

Validates RGB color format

Example:
rgb(255, 87, 51)

Credit Card

Numbers & Finance

Validates major credit card numbers

Example:
4532015112830366

Currency USD

Numbers & Finance

Validates US dollar amounts

Example:
$1,234.56

Social Security Number

Numbers & Finance

Validates US Social Security Number

Example:
123-45-6789

Variable Name JS/Python

Programming & Code

Validates JavaScript/Python variable names

Example:
myVariable_123

JSON String

Programming & Code

Validates JSON string format

Example:
"Hello World"

Username

Text & Content

Validates username format (3-16 chars)

Example:
user_name123

Strong Password

Text & Content

Validates strong password requirements

Example:
MyPass123!

ZIP Code US

Geographic

Validates US ZIP codes

Example:
12345-6789

Postal Code Canada

Geographic

Validates Canadian postal codes

Example:
K1A 0A6

MAC Address

Network & Security

Validates MAC addresses

Example:
00:1B:44:11:3A:B7

UUID

Network & Security

Validates UUID format

Example:
123e4567-e89b-12d3-a456-426614174000
Regex Cheat Sheet
Quick reference for regex patterns and syntax
Regular Expression
Enter your regex pattern and configure flags
Test String
Enter text to test against your regex pattern
Sample Texts:
Find & Replace
Replace matched patterns with new text
Use $1, $2, etc. for capture groups. Use $& for the entire match.
Export & Share
Save, load, or share your regex patterns
Import Text: Paste JSON data above, then click to import. Import File: Select a JSON file from your computer.
Results
Enter a pattern and test string to see results
Enter a regex pattern and test string to see matches