Only Tools Logo
Only Tools Logo
OnlyTools

Regex Library Explorer

Browse and explore prebuilt regex patterns for common use cases

DeveloperRegexpatterns+4 more

Test Regex

Email Address

validation

Validates email addresses with basic format checking

Pattern:
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Invalid Examples:
invalid.email
@domain.com
user@
user@domain

Phone Number (US)

validation

Matches US phone numbers in various formats

Pattern:
^\+?1?[-.\s]?\(?([0-9]{3})\)?[-.\s]?([0-9]{3})[-.\s]?([0-9]{4})$
Valid Examples:
(555) 123-4567
555-123-4567
555.123.4567
+1 555 123 4567
Invalid Examples:
123-456
555-12-3456
phone number

URL

validation

Validates URLs with http/https protocol

Pattern:
^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)$
Valid Examples:
https://example.com
http://www.test.org/path?query=1
https://sub.domain.co.uk
Invalid Examples:
not-a-url
ftp://example.com
https://

IP Address

validation

Validates IPv4 addresses

Pattern:
^(?:(?: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]?)$
Valid Examples:
192.168.1.1
10.0.0.1
255.255.255.255
0.0.0.0
Invalid Examples:
256.1.1.1
192.168.1
192.168.1.1.1

Extract URLs

extractionflags: g

Extracts URLs from text

Pattern:
https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)
Valid Examples:
Visit https://example.com for more info
Check out http://test.org and https://demo.net
Invalid Examples:
No URLs here
ftp://not-http.com

Extract Email Addresses

extractionflags: g

Extracts email addresses from text

Pattern:
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
Valid Examples:
Invalid Examples:
No emails here
invalid@email

Extract Phone Numbers

extractionflags: g

Extracts US phone numbers from text

Pattern:
\(?([0-9]{3})\)?[-.\s]?([0-9]{3})[-.\s]?([0-9]{4})
Valid Examples:
Call us at (555) 123-4567 or 555-987-6543
Phone: 555.123.4567
Invalid Examples:
No phone numbers
123-45-6789

Credit Card Number

formatting

Validates major credit card formats (Visa, MasterCard, Amex, Discover)

Pattern:
^(?: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})$
Valid Examples:
4111111111111111
5555555555554444
378282246310005
Invalid Examples:
1234567890123456
4111-1111-1111-1111
not-a-card

Social Security Number

formatting

Validates US Social Security Numbers

Pattern:
^(?!666|000|9\d{2})\d{3}-?(?!00)\d{2}-?(?!0{4})\d{4}$
Valid Examples:
123-45-6789
123456789
987-65-4321
Invalid Examples:
000-12-3456
123-00-4567
123-45-0000

Strong Password

security

Requires at least 8 characters with uppercase, lowercase, number, and special character

Pattern:
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$
Valid Examples:
Password123!
SecurePass@456
MyStr0ng#Pwd
Invalid Examples:
password
PASSWORD
12345678
Password123

SQL Injection Detection

securityflags: i

Detects potential SQL injection keywords

Pattern:
(\b(ALTER|CREATE|DELETE|DROP|EXEC(UTE)?|INSERT( +INTO)?|MERGE|SELECT|UPDATE|UNION( +ALL)?)\b)
Valid Examples:
'; DROP TABLE users; --
SELECT * FROM users
UNION SELECT password
Invalid Examples:
normal text
user input
safe content
Showing 11 of 11 patterns

Share this tool

https://onlytools.cc/tool/developer/regex-library-explorer
Help others discover this tool by sharing it!

Input Type

Text

Output Type

Processed Text

Categories

developerregexpatternslibraryvalidationreferenceexpressions

About the tool: Regex Library Explorer

Browse and explore prebuilt regex patterns for common use cases

This developer tool is designed to help you developer, regex, patterns quickly and efficiently. Whether you're a professional developer, content creator, or just need to process data, this tool provides a simple, user-friendly interface for all your developer needs.

Our Regex Library Explorer tool is completely free to use, requires no registration, and works entirely in your browser. Your data is processed locally and never sent to our servers, ensuring complete privacy and security.

The tool supports various input formats and provides instant results, making it perfect for both one-time tasks and regular workflow integration. All processing is done client-side for maximum speed and privacy.

How to use tool: Regex Library Explorer

1

Prepare Your Input

Enter your text in the input field. You can paste from clipboard, type directly, or use the example data provided.

2

Process Your Data

Click the process button to convert/transform your data. The tool will automatically process your input and display the results in real-time.

3

Copy and Use Results

Copy the result from the output field. You can also download the results as a file if supported by the tool.

💡 Pro Tips

  • Use the "Try Example" button to see how the tool works with sample data
  • Large inputs are processed efficiently - no size limits for most operations
  • Results are automatically copied to your clipboard for easy pasting
  • All processing happens in your browser - your data never leaves your device

Features & Benefits

100% Free & No Registration

Use this tool completely free without any signup requirements or hidden costs.

Privacy-First Design

All processing happens in your browser - your data never leaves your device.

Instant Results

Get immediate results with real-time processing and no waiting times.

Cross-Platform Compatible

Works on any device with a modern web browser - desktop, tablet, or mobile.

Professional Quality

Built with enterprise-grade reliability and accuracy for professional use.

Easy to Use

Intuitive interface designed for users of all technical skill levels.

Frequently Asked Questions

General Questions

How to Use

Troubleshooting

More Developer Tools Tools

Explore more tools in this category to enhance your workflow