Regex Tester
test_regexUse this when you need to know what a regular expression actually matches. Example prompt: "Does this regex match every email address in this text?" Run a JavaScript regular expression against a test string using a real regex engine. Returns all matches with capture groups and indices. Costs 1 credit. The answer is deterministic.
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 | The text to run the expression against | |
| flags | No | Regex flags such as g, i, m, s, u (default g) | g |
| pattern | Yes | JavaScript regular expression source, without the slashes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of items | |
| result | No | The result, when it is not an object | |
| matches | No |