
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.
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
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!
The example we used foo(?!bar) matches "foo" where not immediately followed by "bar"
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.