| Home » Products » UltraEdit/UEStudio » Menu Commands (UE) » Search | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Regular Expressions |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Article Number: 1738 | Last Updated: Fri, Oct 21, 2011 3:13 PM
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
UltraEdit allows for Regular Expressions in many of its search and replace functions listed under the Search Menu.
Regular expressions allow more complex search and replace functions to be performed in a single operation.
There are two possible sets of legacy syntax that may be used. The first table below shows the original UltraEdit syntax used in earlier versions of UltraEdit. The second table shows the optional "Unix" style regular expressions. This may be enabled from the Configuration Section.
Regular Expressions (UltraEdit Syntax):
Note - ^ refers to the character '^' NOT Control Key + value.
Examples: m?n matches "man", "men", "min" but not "moon".
t*t matches "test", "tonight" and "tea time" (the "tea t" portion) but not "tea time" (newline between "tea " and "time").
Te+st matches "test", " teest", " teeeest" etc. but does not match " tst".
[ aeiou] matches every lowercase vowel [,.?] matches a literal ",", "." or "?". [0-9a-z] matches any digit, or lowercase letter [~0-9] matches any character except a digit (~ means NOT the following)
You may search for an expression A or B as follows:
"^{ John^}^{Tom^}"
This will search for an occurrence of John or Tom. There should be nothing between the two expressions.
You may combine A or B and C or D in the same search as follows:
"^{ John^}^{Tom^} ^{ Smith^}^{Jones^}"
This will search for John or Tom followed by Smith or Jones.
The table below shows the syntax for the "Unix" style regular expressions.
Regular Expressions (Unix Syntax):
Note - ^ refers to the character '^' NOT Control Key + value.
Examples: m.n matches "man", "men", "min" but not "moon".
Te+st matches "test", " teest", " teeeest" etc. BUT NOT " tst".
Te*st matches "test", " teest", " teeeest" etc. AND " tst".
[ aeiou] matches every lowercase vowel [,.?] matches a literal ",", "." or "?". [0-9a-z] matches any digit, or lowercase letter [^0-9] matches any character except a digit (^ means NOT the following)
You may search for an expression A or B as follows:
"( John|Tom)"
This will search for an occurrence of John or Tom. There should be nothing between the two expressions.
You may combine A or B and C or D in the same search as follows:
"( John|Tom) ( Smith|Jones)"
This will search for John or Tom followed by Smith or Jones.
If Regular Expressions is not selected (i.e. no usage of Regular Expressions is active) for a find/replace the following special characters are also valid in the Find and Replace fields:
Note - ^ refers to the character '^' NOT Control Key + value.
For information regarding Perl Compatible Regular Expressions please click here. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Attachments
There are no attachments for this article.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Related Articles
Character Properties
Viewed 487 times since Thu, Oct 13, 2011
Toggle Bookmark command
Viewed 614 times since Thu, Oct 13, 2011
Miscellaneous
Viewed 481 times since Thu, Oct 13, 2011
Search menu
Viewed 503 times since Thu, Oct 13, 2011
Find in Files command
Viewed 996 times since Thu, Oct 13, 2011
Save Bookmarks
Viewed 527 times since Thu, Oct 20, 2011
Goto Line/Page/Bookmark command
Viewed 936 times since Thu, Oct 13, 2011
Regular Expressions (Perl Style)
Viewed 1262 times since Thu, Oct 20, 2011
Find Next command
Viewed 417 times since Thu, Oct 13, 2011
Find command
Viewed 930 times since Thu, Oct 13, 2011
|
|
|

English