search_and_replace
Finds and replaces text in target files, with options for case-sensitive search, replacing all occurrences, and creating backups.
Instructions
Search and replace text in target file.
Args: target_file: Path to target file search_pattern: Text to search for replacement: Replacement text case_sensitive: Whether search is case sensitive replace_all: Whether to replace all occurrences or just first create_backup: Whether to create backup file
Returns: Success message with replacement count
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| replace_all | No | ||
| replacement | Yes | ||
| target_file | Yes | ||
| create_backup | No | ||
| case_sensitive | No | ||
| search_pattern | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |