I'm looking for an OS X tool which allows me to search and replace a search string in multiple files. The requirements are the following:
- Search and Replace
- Search by regular expression
- Search across multiple files
- Search across nested directory structures
- Replace expression can use values from the search (Regular Expression)
- The tool has an easy to use user interface
- Preferably free
I know that some text editors like BBEdit have this functionality, but I would prefer a lightweight tool that doesn't require me to open the files for editing first.
If there aren't any tools to match these requirements, I would also consider a command line alternative. I know that
sed support something like this - a solution that I can define either as a Bash alias or function would be welcome in this case.