🎯 Regular Expression Tester
Test regular expressions online with real-time match highlighting
💡 Enter regular expression and test text to see matches in real-time
Match Results
📚 User Guide
Regular Expression Basics
.- Match any single character*- Match previous character 0 or more times+- Match previous character 1 or more times?- Match previous character 0 or 1 time^- Match start of string$- Match end of string[]- Character set()- Grouping|- OR operator
Common Character Classes
\d- Digit, equivalent to [0-9]\w- Word character, equivalent to [A-Za-z0-9_]\s- Whitespace character (space, tab, etc.)\D- Non-digit\W- Non-word character\S- Non-whitespace character
Quantifiers
{n}- Match exactly n times{n,}- Match at least n times{n,m}- Match between n and m times
Flag Descriptions
g- Global match, find all matchesi- Case insensitivem- Multiline mode, ^ and $ match start/end of each lines- Single line mode, . matches all characters including newline
Practical Examples
- Phone:
1[3-9]\d{9} - Email:
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,} - URL:
https?://[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:/~+#]*[\w\-@?^=%&/~+#])? - IP Address:
(\d{1,3}\.){3}\d{1,3} - Chinese Characters:
[\u4e00-\u9fa5]