util_regex_test
Regex Tester — Test a regular expression against text with the JavaScript (ECMAScript) engine. Returns validity (with the engine error if invalid), every match with index/end, numbered and named capture groups, group indices with the d flag, group count, full-match flag, and an optional replace preview ($1, $). Flags dgimsuyv (default g). Warns about patterns prone to catastrophic backtracking. Up to 200 matches, text max 10000 chars. Params: pattern, text; optional flags, replace. Pairs with /v1/ai/regex. Price: $0.001 USDC (Base, via x402).
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": "util_regex_test"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | 10-20 and 3-4 | |
| pattern | Yes | ([0-9]+)-([0-9]+) |