// developer tool

Regex Tester

Test and debug regular expressions in real-time with match highlighting, group capture and a common pattern library.

๐Ÿ” Regular Expression
/ /
Flags:
Enter a regex pattern to start testing
๐Ÿ“ Test String
โœจ Match Highlights 0 matches
Matches will be highlighted here...
๐Ÿ”„ Replace
Replace output will appear here...
๐Ÿ“š Common Patterns
๐Ÿ“ง Email Address
^[a-zA-Z0-9._%+-]+@...
๐ŸŒ URL
https?://(www.)?...
๐Ÿ“ฑ Phone Number
^(\+\d{1,3})?...
๐Ÿ”’ Strong Password
^(?=.*[a-z])...
๐ŸŽจ HEX Color
^#([A-Fa-f0-9]{6}|...)
๐ŸŒ IP Address
^(\d{1,3}\.){3}...
๐Ÿ“… Date (YYYY-MM-DD)
^\d{4}-\d{2}-\d{2}$
๐Ÿ”  All Caps Words
\b[A-Z]{2,}\b
๐Ÿ”— Slug / Username
^[a-z][a-z0-9_]*$
๐Ÿ”ข Numbers
\b\d+\.?\d*\b
๐Ÿ†” UUID
^[a-fA-F0-9]{8}-...
๐Ÿท๏ธ HTML Tags
<[^>]+>

Regex Quick Reference

What do the common regex symbols mean? โ–ผ
. matches any character, * means zero or more, + means one or more, ? means zero or one, ^ matches start, $ matches end, [] is a character class, () is a group, | is OR, \d matches digits, \w matches word characters, \s matches whitespace.
What are regex flags? โ–ผ
g (global) finds all matches instead of stopping at first. i (ignoreCase) makes matching case-insensitive. m (multiline) makes ^ and $ match line boundaries. s (dotAll) makes . match newlines too. u enables Unicode mode.
How do I use capture groups? โ–ผ
Wrap parts of your pattern in () to create capture groups. For example (\d{4})-(\d{2})-(\d{2}) captures year, month, day separately. In the replace field use $1, $2, $3 to reference captured groups.