PowerGREP : How to search for information even if i do not know exactly what i are looking for?
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
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
O.S


