mathiasrw/rexreplace ? reverse-engineered prompt
Reverse engineered prompt
Build me a simple command line tool for finding and replacing text across files.
I want to be able to pass a search pattern, a replacement, and one or more file globs so I can target exactly the files I want instead of hacking together a bunch of shell commands. It should support regular expressions, including capture groups, and let the replacement be plain text or a little JavaScript expression when I need something dynamic like pulling a version number or using file info.
Make it feel safe and easy to use, with clear defaults and examples that work from the terminal, including a shorter alias like rr if that fits. It should handle recursive file matching with glob patterns, work nicely in scripts, and have a few good tests so common cases like multiline matches, escaped characters, and group replacements keep working. If you need to check current docs for anything, look them up online.
Are you gonna build this?
make sure you review the code using coderabbit