UltraEdit editor using the experience of regular expressions chapter

R ultraEdit the text can be quickly replaced by other processing operations Ctrl +, if in the middle with a number of regular expressions that will help NI more efficient word processing operations, the regular expression associated set out below:

% Match of line - Indicates the search string must be the first line, but does not include any results of selected characters in the line terminator character.

$ Matches end of line - Indicates the search string must end of the line, but does not include any line terminator character selected results of characters.

? Matches any character except newline.

* Matches any number of any character except a newline occurring.

+ Match one or more of the preceding character / expression. You must find at least one character appears. It does not match the repeated line breaks.

++ 0 or more times matches the preceding character / expression. It does not match the repeated line breaks.

^ B matches a page break.

^ P matches a newline (CR / LF) (paragraph) (the DOS file)

^ R matches a newline (CR Only) (paragraph) (the MAC file)

^ N matches a line feed (LF only) (paragraph) (the UNIX file)

^ T matches a tab

[] Matches a single character or any range brackets

^ {A ^} ^ {B ^} A or B match expression

^ Ignore subsequent regular expression characters

^ (^ *) Plus expression in parentheses or in the alternative use the tag command. Regular expressions can nine expressions labels, according to their number determines the order numbers in the regular expression.

Alternatively the corresponding expression is ^ x, x ranges from 1-9. For example: if ^ (h * o ^) (f * s ^) matching "hello folks" ^, ^ 1 ^ 2 then indicates it is replaced with "folks hello".

Regular expression search techniques (UltraEdit syntax):

Remove blank lines: replace% [^ t] ++ ^ p is the empty string

Remove trailing spaces: replace [^ t] + $ string is empty

Delete the first line box: Replace% [^ t] + is an empty string

Each row is set to the beginning of the fixed spaces 4: Replace% [^ t] ++ ^ ([~ ^ t ^ p] ^) is "1 ^"

At the beginning of each segment is set to four fixed spaces: replace% [^ t] + is ""
(blank if a line is started, is regarded as a period of the start line)

The section as a single line: replace [^ t] ++ ^ p ^ ([~ ^ t ^ p] ^) ^ 1 is
(Note: DOS text is assumed here that the way CRLF - CR / LF)

Removing HTML TAG: Replace ^ {<*> ^} ^ {<* ^ p *> ^} is the empty string

Remove all the HTML <A>: Replace <[] ++ a * [] ++ href [] ++ = *> is the empty string

Delete the text specified before the two characters: an empty string replace% ??

Insert two blank character after the column 4: replace% ^ (???? ^) ^ is "^ 1 ^ 2" (^?)

Find all the numbers: [.] [0-9] + + + [0-9] +

Find all of the words: [az] +

Find all the URL: http: // [a-z0-9 ^ ~ `_./^-^?=&] +

Reproduced in: https: //www.cnblogs.com/AI-Algorithms/p/3669646.html

Guess you like

Origin blog.csdn.net/weixin_34055787/article/details/94506142