regex_replace
Find and replace text using regular expressions, supporting capture groups in replacements.
Instructions
[PRO — 3 trial uses left] Find and replace text using a regular expression. Supports capture groups ($1, $2, etc.) in the replacement string.
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": {
"text": "<text>",
"pattern": "<pattern>",
"replacement": "<replacement>"
},
"name": "regex_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Input text | |
| flags | No | Regex flags (default: 'g'). Common: 'gi' for global case-insensitive. | |
| pattern | Yes | Regular expression pattern | |
| replacement | Yes | Replacement string (use $1, $2 for capture groups) |