code_refactor
Automate code refactoring by replacing specific search patterns with defined replacement patterns using regex. Optional context and file patterns limit scope, while capture groups and matched text inclusion enhance precision.
Instructions
Refactor code by replacing search pattern with replace pattern using regex
Input Schema
Name | Required | Description | Default |
---|---|---|---|
context_pattern | No | Optional context pattern to filter matches | |
file_pattern | No | Optional file glob pattern to limit search scope | |
include_capture_groups | No | Include capture groups in the results | |
include_matched_text | No | Include matched text in the results | |
replace_pattern | Yes | Replacement pattern (can use $1, $2, etc. for capture groups) | |
search_pattern | Yes | Regular expression pattern to search for |