How to Use
Enter a regex pattern and test text:
- Pattern: Type your regex (e.g., \d{3}-\d{4})
- Flags: Toggle g (global), i (case-insensitive), m (multiline), s (dotAll)
- Test string: Paste text to match against
- Results: See highlighted matches and captured groups
Common Regex Patterns
- Email: [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
- URL: https?://[^\s]+
- IP Address: \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
- Phone: \(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4}
Quantifiers & Anchors
- * zero or more, + one or more, ? zero or one
- {n} exactly n, {n,m} between n and m
- ^ start of string, $ end of string
- \b word boundary, \B non-word boundary
Step-by-Step Instructions
- 1Enter your regex pattern in the pattern field.
- 2Toggle flags (g, i, m, s) as needed.
- 3Paste or type test text in the test area.
- 4View highlighted matches and match count.
- 5Inspect capture groups for each match.