regex_test
Test a JS-style regex against text to get match count and up to 20 match slices.
Instructions
Test a JS-style regex against text. Returns match count and up to 20 match slices.
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": {
"pattern": "<pattern>",
"text": "<text>"
},
"name": "regex_test"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| flags | No | Flags e.g. gi (default g) | |
| pattern | Yes | Regex pattern (no /slashes/) |