主页  »  技术支持  »  指南/使用技巧  »  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

Cnet/Download.com review
"我们并没有夸大其词:
UltraEdit真的非常棒..."

Corporate Licensing

It's easy to purchase corporate licensing from us!

  • Bulk/quantity discounts
  • Enterprise/plant/site licensing
  • Purchase with PO or invoice

The new UltraSuite

The only fully integrated solution of its kind!

Four powerful applications: UltraEdit, UltraCompare, UltraFinder, and UltraSentry!

Save over 33% when you bundle with the UltraSuite!

Power of Portable

Now supporting PortableApps!

UE/UC Mobile

Unleash the power of the total file management solution on your flash drive!