Test a regular expression
test_regexRun a JavaScript regex against text to list each match with its position and capture groups, up to 200 matches within 0.5 seconds.
Instructions
Run a JavaScript regular expression against text and list every match with its position and capture groups (up to 200 matches, 0.5 s limit).
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": "test_regex"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| flags | No | JavaScript flags such as gi | g |
| pattern | Yes | Pattern without slashes |