Regular Expression Tester
/
/
Flags:
Common Regex (click to fill in)
Current selection:
1
Match results will be highlighted here...
Match Details
0
| # | Match Content | Index Position | Capture Group |
|---|---|---|---|
| No match results yet | |||
Tool Description
This tool is a powerful online regular expression tester with built-in common regex templates, helping developers verify regex matching results in real time, quickly extract capture groups, and highlight matched content.
Main Features
- One-click common regex fill: Built-in regex templates for mobile phone, URL, Email, Chinese characters, double-byte characters, 18-digit ID card, integer, IPv4, date, etc. Click to test.
- Real-time matching: Automatically matches and highlights results in real time when entering regex or modifying test text.
- Flag support: Supports all standard flags including g (global), i (ignore case), m (multiline), s (match newline), u (Unicode), and y (sticky).
- Capture group extraction: The table lists in detail the content, start index, and all sub-capture group data for each match.
Common Regex Descriptions
1[3-9]\d{9}— Matches Mainland China mobile phone numbers (11 digits, starts with 1, second digit 3-9)[\w.\-]+@[\w\-]+(\.[\w\-]+)+— Matches Email addresses[\u4e00-\u9fa5]+— Matches Chinese characters (Unicode Han range)[^\x00-\xff]+— Matches double-byte characters (including Chinese, Japanese, Korean, etc.)((25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)\.){3}(25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)— Matches IPv4 addresses (0.0.0.0 - 255.255.255.255)\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])— Matches date format (YYYY-MM-DD)
Tool Features
- Line number editor: The test text area has line numbers, making it easy to locate multi-line content.
- Safe escaping: Escapes HTML special characters before highlight rendering to prevent XSS attacks.
- Pure front-end execution: All calculations are performed locally in your browser; your data is never collected or uploaded.