PowerGREP’s regular expression engine is fully compatible with popular regex flavors such as those used by Perl, Java and the .NET framework. PowerGREP also supports all the Perl 5 extensions, such as non-greedy operators and zero-width assertions. PowerGREP also supports the Java extensions (possessive quantifiers) to Perl’s flavor, as well as the .NET framework’s extensions (named capturing groups).
If you have already used regular expressions with any of those programming languages, or an application developed with those programming languages, you can instantly apply your skills to PowerGREP. If not, PowerGREP’s documentation includes a detailed regular expression tutorial. When you learn how to use regular expressions, you will gain a valuable new skill that will come in handy in many situations.
Using PowerGREP Instead of Perl
If you are a seasoned Perl programmer, you probably often invoke the interpreter from the command line to apply a regular expression to a file. While that works fine, of course, you can do this a lot easier with PowerGREP.
Instead of typing perl -pi -e ‘s/foo/bar/’ somefile on the command line, select the search-and-replace action type in PowerGREP, type foo in the Search box, type bar in the Replace box, and click the Replace button. The advantage is that PowerGREP allows you to preview the operation, inspect the replacements made, make and revert individual or multiple replacements, and even undo the whole thing by restoring the backup files it creates.
“I like the use of proper Perl regex, so I don’t have to remember some special proprietary syntax variation.”
— Martin Andersen
14 February 2003, Australia
|Search and replace automatically or interactively|