Regex Tester
Regular expressions (regex) are a powerful tool for matching patterns in text.
No matches found
How to use regex
- Enter regex pattern
- Select match options (e.g. ignore case)
- Enter test string
- Click "Test match" to view results
Common regex examples
Email validation
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Match standard email address format
Chinese phone number
^1[3-9]\d{9}$
Validate Chinese mainland 11-digit phone number
Extract numbers
\d+
Match one or more consecutive digits
Remove whitespace
\s+
Match one or more whitespace characters