test_regex
Validate regex patterns against sample text. Returns all matches, captured and named groups, and positions to confirm correctness before deployment.
Instructions
Test a regular expression pattern against text. Returns all matches, captured groups, named groups, and match positions. Useful for validating patterns before deploying them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to test the pattern against | |
| flags | No | Regex flags: i (case-insensitive), m (multiline), s (dotall), u (unicode) | |
| global | No | Find all matches, not just the first (default: true) | |
| pattern | Yes | Regex pattern without delimiters (e.g., "^[a-z]+$", "(\w+)@(\w+)\.(\w+)") |