DevUtils

Regex Tester

Test, debug, and visualize regular expressions in real-time. See matches, capture groups, and use common regex patterns.

Regular Expression
Enter your regex pattern and configure flags
/\b\w+@\w+\.\w+\b/g
Test String
Enter the text you want to test against your regex
Results
No matches found
Common Patterns
Click to use common regex patterns

Email

Matches email addresses

\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b

URL

Matches HTTP/HTTPS URLs

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

Phone (US)

Matches US phone numbers

$$?([0-9]{3})$$?[-. ]?([0-9]{3})[-. ]?([0-9]{4})

IP Address

Matches IPv4 addresses

\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b

Date (MM/DD/YYYY)

Matches MM/DD/YYYY format

\b(0?[1-9]|1[0-2])\/(0?[1-9]|[12][0-9]|3[01])\/(19|20)\d\d\b

Hex Color

Matches hex color codes

#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})

Credit Card

Matches credit card numbers

\b(?:\d{4}[-\s]?){3}\d{4}\b

Username

Matches usernames (3-16 chars, alphanumeric + underscore)

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

Password

Strong password (8+ chars, mixed case, number, special char)

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

HTML Tag

Matches HTML tags

<\/?[a-z][a-z0-9]*[^<>]*>
How to Use
1

Enter Regex Pattern

Type your regular expression pattern and set flags

2

Add Test String

Enter the text you want to test against your regex

3

View Results

See highlighted matches and capture groups instantly