By Deane Barker on November 3, 2004

PowerGREP: Windows grep Software: I know that search and replace tools aren’t anything new, but PowerGrep is far and away the best one I’ve ever seen for Windows.

PowerGREP is a powerful grep tool for quickly searching through large numbers of text and binary files, such as software source code, letters and correspondence, server or system logs, reference texts, historic archives, etc. to quickly find exactly what you are looking for.

Not in a million words could I explain everything this program does. I’ll try a little:

  • Standard search and replace. Great regex support and the ability to parse Word and PDF files.

  • Information collection. You can look for a certain pattern, and put every example of it in another file.

  • Filename searching. With regex support and directory recursion. (Combine this with information collection and you really have something…)

  • Sequences. Roll-up search and replace actions into “Sequences.” For instance: first find X and replace it with Y, then find A and replace it with B, and do this on eight million files, one at a time.

  • Macros. Save anything as an “Action” so you don’t need to recreate it later.

  • Automatic backup. Before doing anything, save a backup of the affected file in another directory with another name pattern (“backup of…”)

  • Binary support. Search binary files for any sequence of bytes.

  • Command line scripting. Fantastic number of parameters.

The documentation is quite good, and includes some great examples of using PowerGrep for Web development.

An example is provided of setting up PowerGrep to recurse through a directory tree of HTML files and write out a PHP navigation menu for everything it finds. You could script this and schedule it to update the navigation menu every night.

(Tools like this make me much less fearful of massive repositories of HTML files.)

Thankfully, the PowerGrep Web site is exceptionally well done with lots of information and a Java-based demo. At $99, it isn’t cheap, but like EditPlus, it’s worth it.



  1. PowerGREP is an amazing tool that does amazing things amazingly fast.

    I ran one operation in a text editor (EmEditor) and it was still running, burning up CPU cycles and keeping that CPU hot as hell, 30 hours later. I aborted, tried it on PowerGREP, and it ran in 20 minutes.

    But I am trying to find anything else that will come close to what PowerGREP does in a desperate attempt to avoid buying the software. Why? I can’t trust the developer.

    In that 20 minutes, PowerGREP altered about one in a thousand characters, which is very hard to spot in a million lines of text. I continued to work on the file for a week before finding the subtle but important mutilations.

    I documented the error, emailed the developer, and found out he’d already known that this would happen in files in the encoding I was using–and yet he hadn’t warned users not to use that encoding, or disabled that encoding in the menu options. Indeed, the advertised ability to work in other encodings was why I’d chosen PowerGREP, and when I saw that encoding as an option in the file menu, I was thrilled.

    I feel like I was lied to by a developer who didn’t want to admit a problem in his software, and that lie cost me a week of work. But nothing else could do the same thing so I tried again, this time changing my data to UTF-8, which the developer claimed worked. Soon I found it didn’t (at least not with non-ASCII characters–but non-ASCII characters are the whole reason for unicode!). Seems like the developer knew about that, too.

    Now he claims to have fixed the problems, but I don’t know if I can trust him on that, and I don’t know if I can trust that there aren’t still more hidden data-mangling bugs. I can accept unknown bugs cropping up, but keeping known ones hidden–especially ones that can change data in subtle ways that may be very hard to spot in huge files–really burns me.

    I’ll try other windows grepping tools, and I’ll try running unix environments and unix grepping tools, but if I can’t find anything else that does what PowerGREP does, I may be forced to buy it. But I’ll always spend hours combing through the data just to be sure it hasn’t corrupted anything. Since I can’t trust the developer to be honest about the product, I’ll have to check myself.

Comments are closed. If you have something you really want to say, tweet @gadgetopia.