regex_test
Tests a Python regex against text: op=match (first match), op=findall (all matches with groups and positions), op=sub (replace). Runs in a separate process with a 100 ms timeout, so catastrophic backtracking (ReDoS) returns 422 instead of hanging. Text up to 10 000 chars, pattern up to 1 000. Cost €0.0005 per call, charged to the API key in Authorization: Bearer. Parameters — pattern: regex pattern; text: text to test; flags: any of i,m,s,x; op: match (default) | findall | sub; replacement: replacement string (sub).
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_test"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | No | ||
| text | No | ||
| flags | No | ||
| pattern | No | ||
| replacement | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |