Home  »  Support  »  Tutorials/Power Tips  »  UltraEdit  »  Perl compatible regular expressions
IDM Power Tips

Perl-style regular expressions

Have you been looking for a way to use your Perl compatible regular expressions with UltraEdit? Now you can! UltraEdit v12.00 introduces a powerful new regular expressions engine which has added Perl compatible power to your favorite text editor.

Perl compatible Regular Expressions

There is obviously a vast multiplicity of expressions you can write so we aren't going to try to tell you all examples. This is just an introducation to usnig the Perl compatible regular expressions. For further information regarding the Perl compatible expressions syntax, please see the Help.


Enable Perl compatible regular expressions

UltraEdit has 3 styles of regular expression syntax. The default setting is the "UltraEdit Style" expression syntax.

To enable Perl compatible expressions, go to Advanced : Configuration : Search : Regular Expressions Engine, and enable (check) Perl compatible Regular Expressions

Configuration


Find your string

To search for your string go to Search : Find (or CTRL F). In order to use the Perl compatible regular expressions you MUST check the option for Regular Expressions.

Type your expression, making sure you are using the correct syntax, and hit Find Next. It's that easy!

Find Dialog


A few examples

The example we used foo(?!bar) matches "foo" where not immediately followed by "bar"

Results

Using the "Highlight All" feature, you can see that the find did match "foo" not immediately followed by "bar"

For a few more examples, keep reading:

foo(?!bar) matches "foo" where not immediately followed by "bar"
(?<!bar)foo matches any "foo" NOT following "bar"
o{3} matches "o" occurring 3 times
o{3,} matches "o" occurring 3 or more times
o{3,5} matches "o" occurring at least 3, but not more than 5 times
(John|Jane|Jim|James)   Alternate matches (matches John, Jane, Jim, or James)

As mentioned above, the possibilities are limitless! For a more detailed explanation of Perl compatible regular expressions see the Help.


Back to power tips index


Buy Now
Upgrade
Download

Application Screenshots

UltraEdit feature maps
Featuring the all new

Cnet/Download.com review of UltraEdit
"We won't mince words:
UltraEdit is outstanding..."

Save almost 50%

Bundle savings

Save nearly 50% on UltraEdit when you bundle a license with our other titles

Road trip, anyone?

UE3 software

Bundle UE3 with your UltraEdit upgrade and save 50% or more!


Take the UltraEdit tour