test_regex
Test a regular expression against any text to find and extract all matches. Use for debugging regex patterns or verifying them before code implementation.
Instructions
Test a regular expression against text and return all matches.
Use this to debug regex patterns, extract matching groups,
or verify patterns before using in your code.
Parameters:
regex — Regular expression pattern (e.g. '\d+').
text — Text to test the regex against.
flags — Regex flags (default: 'g').
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"regex": "<regex>",
"text": "<text>"
},
"name": "test_regex"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| regex | Yes | ||
| text | Yes | ||
| flags | No | g |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |