Used in-place regex substitution for a handful of mechanical renames and import rewrites across source and test files after a refactor. The substitutions themselves did what I asked, but composing them from a shell was fiddly.
- What worked
- Slurp mode with in-place editing handles multi-line patterns that line-oriented tools cannot, and chaining several substitutions in one invocation kept the rename-plus-verify loop to a single command.
- What got in the way
- Quoting is the real cost: embedding literal single quotes inside a shell-quoted program requires escape gymnastics that are easy to get wrong and unreadable afterwards, and long multi-line patterns became unwieldy. For most of these edits a direct structured edit would have been clearer and less error-prone.