PowerGREP 5.1.6 Retail - PowerGREP: Windows grep Software to Search (and Replace ...

PowerGREP 5.1.6 Retail

PowerGREP 5.1.6 Retail
PowerGREP 5.1.6 Retail


PowerGREP is a powerful Windows grep tool. Quickly search through large numbers of files on your PC or network, including text and binary files, compressed archives, MS Word documents, Excel spreadsheets, PDF files, OpenOffice files, etc. Find the information you want with powerful text patterns (regular expressions) specifying the form of what you want, instead of literal text. Search and replace with one or many regular expressions to comprehensively maintain web sites, source code, reports, etc. Extract statistics and knowledge from logs files and large data sets.

Find What You Want
With PowerGREP, you can quickly search for a piece of information through files and folders on your computer or network. Simply type in a keyword or phrase in the Search box, select which folder PowerGREP should go through and which types of files are of interest. PowerGREP will present you with a list of files and/or individual search matches. Double-clicking a match in the results to open its file and inspect the match's context.

The Search feature is very useful for searching through archived files. Suppose you remember writing a letter or email about something, but you do not remember to who and when, simply type in a relevant keyword in PowerGREP and search through all your archived correspondence. If you are a programmer, you can quickly search through all your source code, or your development tool's library source code. You could type in a function name to see where and how it is used, which is very useful when studying new library functions, or when you plan to modify one of your own library functions. Tracking particular events in huge numbers of log files is easy. Type in a relevant keyword or regular expression (see below) matching the event, and PowerGREP will give you a list of log file lines where that event occurred.

Search Without Knowing What You Want
Using regular expressions will unleash the true power of PowerGREP. Regular expressions allow you to search for information even if you do not know exactly what you are looking for. If you are looking for an email address, construct a regular expression matching any email address, and PowerGREP will happily present you with all email addresses it can find in the files you had it search through. It is even easier: simply open the example PowerGREP Action file for finding email addresses that is included with PowerGREP, and let it run. When you have the list, double-click the email addresses to inspect the context so see which is the one you were looking for.

If you know something happened in October 2002, you could search using the regular expression 2002-10-[0-3]?[0-9]. That is, the text 2002-10-, followed by an optional digit between 0 and 3, followed by another digit. If you are unsure about the date format, just search using 2002-10-[0-3]?[0-9]|[0-3]?[0-9]/10/(20)?02|10/[0-3]?[0-9]/(20)?02. Looks a bit complicated, but building such a regular expression is quite straightforward once you have a little bit experience. It took me about 30 seconds to write the last one from scratch.

While you can do many complex things with regular expressions, many classic searches are easy to do with regular expressions. Searching for any of a bunch of keywords, simply separate them with a pipe symbol: keyword1|keyword2|keyword3. Looking for a word starting with "cat"? Just use \b for the word boundary, and \w+ for one or more word characters (i.e. letters): \bcat\w+. Very easy, once you know how. PowerGREP's help file and printable manual will tell you all there is to know about regular expressions.

It almost goes without saying that after carefully crafting a complex regular expression, you can easily save it into a PowerGREP library for instant reuse. Or, share libraries with colleagues and friends.

PowerGREP's regular expression syntax is fully compatible with Perl, Java and .NET, including all flavor-specific extensions. Many other programming languages and tools use the same regular expression syntax. Learning regular expressions is a smart investment. They have many applications in addition to those offered by PowerGREP.

Simply Searching and Replacing through Large Numbers of Files
The basic way to use PowerGREP's search and replace functionality is like the search and replace feature offered by any text editor. Type in the text you want to have replaced in the search box. Put the text you want to have it replaced with in the Replace box. Specify the folder and file mask (such as *.txt), and click the Execute button. PowerGREP will then perform the search and replace operation on all files matching the file mask in the folder that you specified, and in its subfolders if you want.

But PowerGREP offers you much more than that. If you want, PowerGREP will present you with a list of all replacements that have been made. Double-click on a replacement to see its context. Prevent mistakes by previewing the results before modifying any files. Replace or revert individual matches in PowerGREP's full-featured file editor. Should you change your mind later, the Undo History will save your day by restoring all files that were modified.

Specify target options to tell PowerGREP to duplicate the files searched through and make the replacements in the duplicated files. This way you can easily produce different editions of the same set of files.

Powerful Text File Maintenance with Regular Expressions
While searching and replacing pieces of text is useful, you can automate many tedious editing tasks by adding regular expressions to the mix. Let me present you with an example. Suppose you have a rather long list of pairs in the form of one=another and you want to swap them. You can do this easily with PowerGREP by searching with the regular expression (\w+)=(\w+) and replacing with \2=\1. The regular expression will match a word, followed by an equals sign, followed by another word. The parenthesis capture the first word into the first "backreference", and the second word into the second "backreference". In the replacement text, we can reuse those with \1 and \2 respectively. So setting the replacement text to \2=\1 will swap the words.

Do not worry if the above looks complex. The documentation that is included with PowerGREP contains a detailed introduction to regular expressions. With a bit of practice, you can create simple regular expressions like the above in a matter of minutes. And when you spend time creating a complex regular expression, you can save it into a PowerGREP action file or library for instant reuse later.

Redact Files with Search and Delete
A search-and-delete is like a search-and-replace with a blank replacement. You can use it to easily redact a list of items. You can also use it to de-duplicate file content by deleting only duplicate matches.

Edit MS Word and OpenOffice Documents
PowerGREP's built-in converters for MS Word DOCX files and OpenOffice and LibreOffice ODT files allow you to search and replace through these files. In the File Selector, make sure "file formats to convert to plain text" is set to "writable proprietary formats" or "all writeable formats". Substituted text will retain its formatting, even though PowerGREP doesn't show you any formatting.

Search and replace automatically or interactively

Unlimited Power and Flexibility
While many Windows grep tools can search and replace with a single regular expression, PowerGREP offers unparalleled power and flexibility. Apply many changes at once by using a list of regular expressions. You can have the list processed sequentially, where each step works on the results of all previous steps, or concurrently, where each step is independent. There's no limit to the number of regular expressions you can use.

You can easily perform complex editing and conversion tasks with PowerGREP's unique file sectioning and extra processing features. Instead of creating one complex regular expression that does it all, use several simple regular expressions that work together. Use file sectioning to process only certain parts of each file, such as only headings, only body text, only markup tags, only comments and strings in source code, etc. Use extra processing to modify each search match in any way you want using full regular expressions, not just simply move text around with backreferences.

Gathering Raw Data
While most grep tools only display search results on the screen, PowerGREP can save search matches into one or more new files. This way you can extract useful data from a large set of files, such as logs and archives. You can feed this data into another application for further processing.

Use PowerGREP's unique file sectioning abilities to collect exactly those search matches you're interested in. E.g. when processing source code, you can easily skip or restrict the search to comments and strings. With the unique extra processing feature, you can convert each match into a useful format. E.g. when extracting search terms from referrer URLs in your web site's logs, you can automatically convert the URL-encoded search terms into plain text before saving them to file.

Computing Ad Hoc Statistics
You can gather useful statistics by telling PowerGREP to count identical search matches and sort them alphabetically, or by match count. You can have the statistics split up for each file that was searched through, or have everything put together to see the overall totals.

You can use this to collect virtually any statistic you want from any kind of log or archive. Very handy for inspecting server or system logs for which no specialized analyzers are available, or for computing specific statistics not supported by your log analyzer. PowerGREP comes with examples for processing web server logs. These examples are explained in the documentation in great detail, so you can adapt them to your own needs or to different kinds of logs.

Log files often compress really well. Web logs typically take up only 5% to 10% of their usual space when compressed with 7-zip or WinZIP. Since PowerGREP can search through compressed files directly, you can save lots of disk space while still being able to search and analyze your logs.

Collecting Google search keywords from web logs with PowerGREP
Create PowerGREP Actions Instead of Writing a Log Analyzer
If you are developing software that generates log files, or work with custom software that does, you can save a lot of time by creating a PowerGREP library. Share this library with customers or colleages that use the same software, instead of investing a lot of time in creating a log analyzer specific to that software.

Start with creating regular expressions that match the various entries in the log files. Then use those regular expressions to create PowerGREP actions that calculate various interesting statistics or extract useful entries from your logs. Finally, put those actions into a PowerGREP library. This is a single file that you can easily email to others or make available for download.

Anybody can then open that library in PowerGREP, pick an action from it, specify the location of their log files, and instantly get the specific information they want. They do not need to know anything about regular expressions or understand how PowerGREP works to do this.

Split or Rearrange Large Logs and Data Sets
PowerGREP handles huge files without breaking a sweat. You're only limited by the size of the drive you want to store your files on. But other applications may perform poorly on large files, or even crash on files larger than 2 GB or 4 GB. With PowerGREP, you can easily split large files into multiple smaller files. The new files could be numbered and each have a fixed number of entries. You could split large monthly logs into smaller daily logs.

You can even take things one step further to rearrange or recombine files. When splitting multiple files, PowerGREP allows you to use the same target files for multiple source files. You could split monthly logs into weekly logs. without worrying that matches from two monthly log files may need to go into the same weekly log file. PowerGREP combines them automatically. You could even "split" weekly logs into monthly logs or rearrange daily system logs (one log for all users) into monthly user logs (one log for each user).

Splitting files works like a search and replace except that the "replacement" is the target file that the match should be written to. You can use regular expressions to build the target path based on parts of the search match. You can use match placeholders to count matches and number files. Using file sectioning you can split files along lines or records or anything you can match with a regex, while using another regex to extract part of the line or record such as a date to determine its target file. PowerGREP's help file includes plenty of examples that demonstrate all of this.

Only for V.I.P
Warning! You are not allowed to view this text.