replace_regex
Replace regex matches in a file only when the number of matches equals an expected count, ensuring precise edits.
Instructions
Replace regex matches only when the exact expected occurrence count matches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bom | No | preserve | |
| path | Yes | ||
| dotall | No | ||
| newline | No | preserve | |
| pattern | Yes | ||
| encoding | No | preserve | |
| base_hash | No | ||
| replacement | Yes | ||
| final_newline | No | preserve | |
| case_sensitive | No | ||
| expected_occurrences | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |