MacOS – Do any OS X apps ease Search and Replace across multiple files

applicationsmacossearchsoftware-recommendationUtilities

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 perl and sed support something like this – a solution that I can define either as a Bash alias or function would be welcome in this case.

Best Answer

I typically use TextMate:

TextMate Search and Replace dialog

TextMate (1) is/was a buy product, but TextMate 2 is currently under active openSource development on gitHub and free to use.