regex-tester
Validate regex patterns, find all matches with capture groups, and replace text instantly. Explains what the pattern matches for debugging.
Instructions
Safe regex testing and extraction. Validates a pattern, finds all matches (with capture groups), replaces text, and explains what the pattern matches. Zero external API calls — instant, deterministic. Useful for agents generating or debugging regex patterns mid-task, validating extracted data, or transforming text with precision.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "regex-tester"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | No | Regular expression pattern (without delimiters). Example: '(\\d{3})-?(\\d{4})' | |
| flags | No | Regex flags: g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode). Default: 'g'. | |
| input | No | Text to test the pattern against. Max 50,000 chars. | |
| replace_with | No | Optional replacement string. Uses $1, $2, etc. for capture groups. When provided, returns replaced output. |