regex_replace
Find and replace text using regular expressions with capture group references ($1, $2, $&) in the replacement string.
Instructions
Find and replace text using a regex pattern. Supports capture group references ($1, $2, etc.) in the replacement string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | Regular expression pattern to match | |
| input | Yes | Text to perform replacement on | |
| replacement | Yes | Replacement string. Use $1, $2 for capture groups, $& for full match. | |
| flags | No | Regex flags. Default: g (global) |