Like any Windows grep tool, with PowerGREP you can limit the search to specific files. On top of that, PowerGREP offers you the unique ability to search only through specific parts or sections of those files. E.g. when searching through HTML files, you can easily limit the search to the headings in those files.
The key benefit of PowerGREP’s file sectioning is that using it, you can keep your regular expressions or search queries simple. In the screen shot, you can see a search-and-replace to be executed on Java and C++ source code files. With PowerGREP’s file sectioning feature, the search is restricted to comments and strings in Java and C++ source code files. This is done with a list of four simple regular expressions. One for single-line comments, one for multi-line comments, one for strings, and one for characters. Achieving the same with a single regular expression in a basic grep tool is certainly possible, but far more complicated. With PowerGREP, you just need three off-the-shelf (or, off PowerGREP’s library) regular expressions that you can reuse in many situations.
When you search through entire files, PowerGREP will by default display one line of context in the results for each match. Just like most other Windows grep tools.
If your files are not line-based, use PowerGREP’s file sectioning to split the file into records or logical chunks, any way you want. The results will then display whole records as context in the search results. You can either use a regular expression to match entire records, or simply specify the record delimiters.
There are two ways in which you can get your own copy of PowerGREP and evaluate the software risk-free.
The best option is to buy your own copy of PowerGREP for US$ 159. Your purchase is covered by Jan Goyvaerts's personal three month risk-free unconditional money-back guarantee. This allows you to try the software without any limitations and without any risk for three months.
Alternatively, you can download the free evaluation version of PowerGREP. The free evaluation version can be downloaded anonymously. It allows you to explore PowerGREP for 15 days of actual use. Full documentation is included. The documentation extensively covers both PowerGREP itself, and the regular expression syntax.