Aba Search and Replace ($30, 30-day free trial) provides a straightforward way to perform what can sometimes be a complex task: bulk manipulation of the contents of files. It is particularly useful if you need to work with a variety of structured text files, such as HTML or source code, especially those outside a structured development environment.
Using Aba Search and Replace is very simple: Select files to search (typically, a folder or a directory structure), then type in text to search for. Aba will start searching as soon as you start typing, providing dynamic search results. It's quite zippy, easily tearing through thousands of small files almost as fast as I could decide what I wanted to look for.
To get the most out of Aba Search and Replace, you will need to have at least a basic familiarity withregular expressions. While being a true regexp master is often a lifetime's work, learning the basic structures that will handle 95 percent of your likely work takes only a few hours, at most. Regular expressions allow you to perform tasks such as finding all occurrences of a word that are within double-quotations or single quotations, but not within brackets, or locate all the lines in a file that have a number in the pattern of a phone number. It should be emphasized that you do not need to use regexp with Aba, but if the tasks you need to perform are complex enough that a program such as Aba is going to be useful to you, using them will make your life a lot simpler.
Once it's done, Aba Search and Replace shows a list of all occurrences of your search target, with enough context that you know what you're looking at. You can then perform a replace operation, if desired. You can also specify search and replace at the same time, but I like to be sure my search is correct before replacing; it's very easy to create a search that is too broad or too narrow.
Aba Search and Replace will normally ignore specified binary file types, though you may need to add some to the default list--it will skip MP3 but not MP4 by default, for example. You may also need to remove some: One test I performed involved a lot of Word .doc files, and I wanted to look inside them. This highlights one major flaw with Aba, namely, there is no ability to save or load settings, either file preferences or search strings. (Some search history is saved, but this is less useful than the ability to save a full combination of target directory, search string, and replace string.) If I want to exclude *.doc in a search, I must enter it into the exclusion list, and then delete it again when I need to include such files in a search. If I've laboriously constructed a complex and intricate regexp expression, I will need to save it somewhere else or risk losing it as Search History fills up and is cleared out.
Sign up for Computerworld eNewsletters.