Replace matching text in a file.
str_replaceReplace an exact string occurrence in a file that appears only once, using content matching without line numbers.
Instructions
Replace an exact occurrence of old_str with new_str in a file. old_str must appear exactly once in the file. No line numbers needed — matches on content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_str | Yes | ||
| old_str | Yes | ||
| filepath | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |