Regex tester
regex_testTest a JavaScript regular expression against text to list every match, its groups, and position; optionally apply a replacement string.
Instructions
Run a JavaScript regular expression against text and list every match with its groups and position. (Same as IT-Tools /regex-tester.)
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 | JS flags, e.g. "gi"; "g" is always added | g |
| pattern | Yes | ||
| replace | No | Optional replacement string ($1, $<name> supported) |