Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a regular expression based search/replace GUI tool that is able to handle multiple files/subdirectories, something like grepWin but for Mac OS X.

PS. I'm aware of grep and I don't need an editor, just a standalone tool.

share|improve this question
Komodo Edit ( has a "Find/Replace In Files" feature. Its a free editor for Mac, Windows and Linux. – jsherk Apr 4 '13 at 20:40
up vote 3 down vote accepted

Oh, I also just found this:

About Find & Replace It!

A powerful search and replace utility. It allows performing very complex batch replacements inside text files of any size. It supports regular expression syntax and dozens of encodings. It has scripting capabilities which allow transforming on the fly the replacement text for every found string. It even handles batch processing of the encoding of files, as well as of types of end-of-lines.

Here are some key features of Find & Replace It!:

  • Find and replace across many files at once
  • Supports regexps
  • Supports many text encodings
  • Provides a regexp editor
  • Provides a find & replace preview
  • Offers a scripting interface that allows to transform replacement text on the fly
  • Many more features

It's developed by dProg - Philippe Docourt. I've never used it, so take this reccomendation with a grain of salt!

share|improve this answer
thanks......... – user187291 Mar 16 '10 at 17:30
Link is dead. :-( Also see… – Jona Christopher Sahnwaldt Apr 14 '15 at 0:00
@JonaChristopherSahnwaldt Link Is Ressutated! – Josh Apr 14 '15 at 2:14
@Josh Cool, thanks for the quick response! – Jona Christopher Sahnwaldt Apr 14 '15 at 2:17

You're probably looking for a GUI app, but I can reccomend a terminal command. Perl can do inline replacement:

find . -type f -exec perl -p -i -e "s/SEARCH_REGEX/REPLACEMENT/g" {} \;

This will find all files under the current directory and replace based on the provided regexp. If you need to change directories, an easy way is to type: cd (be sure there's a space after) and then drag and drop a folder from the Finder onto the terminal window. Press return and you'll be in the folder you want; then run the perl command above.

If you want perl to make backup copies before replacing, run:

find . -type f -exec perl -p -i.bak -e "s/SEARCH_REGEX/REPLACEMENT/g" {} \;
share|improve this answer
I'd love to know why I was downvoted so I could correct any issues with my answer... – Josh Mar 11 '10 at 2:00
any time I suggest Perl in a SO or SU answer I get downvoted without an answer. How it goes around here apparently. :) – Ian C. Mar 12 '10 at 16:11
@Ian: Maybe I should have used the ruby syntax? ;-) – Josh Mar 12 '10 at 16:13
imagine super users using perl regular expressions, that's crazy – mindless.panda Mar 16 '10 at 15:27

I understand that you don't need a full editor, but often the best tools are found within one. TextMate has full support for regular expressions and handles files and directories very well. Another that I haven't tried but heard good things about is TextWrangler.

share|improve this answer
+1 for TextWrangler - I use its big brother, BBEdit, for search and replace, diff, etc. – Paul R Mar 2 '10 at 17:54
thanks, i'm already using Textmate and it's awesome, but not as a search-replace tool. "Why isn’t there a damn stop button?!!" (…) ;)) – user187291 Mar 2 '10 at 22:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .