Guide to using the real-time regex testing tool with group extraction.
The Regex Tester provides a real-time environment for building and testing regular expressions.
## Interface
- **Pattern Input**: Enter your regex pattern (without slashes)
- **Flags**: Toggle g (global), i (case-insensitive), m (multiline), s (dotAll)
- **Test String**: Paste the text to test against
- **Results**: Matches are highlighted inline; groups listed below
## Reading the Results
- **Green highlight**: Full match
- **Blue highlight**: Capture group
- **Match panel**: Shows each match with its index and captured groups
## Common Patterns
```
Email: [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}
URL: https?://[^s/$.?#].[^s]*
Phone (US): \(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}
Date: \d{4}-\d{2}-\d{2}
IPv4: \b(?:\d{1,3}\.){3}\d{1,3}\b
```
## Named Groups
Use named capture groups for cleaner code:
```
(?\d{4})-(?\d{2})-(?\d{2})
```
## Export
Copy your regex as:
- JavaScript regex literal: `/pattern/flags`
- Python raw string: `r"pattern"`
- Generic: `pattern` with flags noted
## Tips
- Use the "i" flag for case-insensitive matching
- Escape special characters: . * + ? ^ $ { } [ ] | ( ) \
- Test with edge cases — empty strings, special characters, unicode