This article from http://space.itpub.net/12350275/viewspace-682549
The following are the UE tips extracted from the Internet:
1) Delete blank rows: replace % [^ t] ++ ^ P with a blank string. 2) Delete the trailing space of the line: replace [^ t] + $ with a blank string. 3) Delete the first space of the line: replace % [^ t] + with an empty string. 4) each line must start with a fixed four-space character: replace % [^ t] ++ ^ ([~ ^ T ^ p] ^) is "^ 1" 5) each segment is set to a fixed starting with four spaces: replace % [^ t] + with "" (if a row starts with a space, it is regarded as the starting line of a segment). 6) Merge the segment into one row: replace [^ t] ++ ^ P ^ ([~ ^ T ^ p] ^) is ^ 1 (Note: here we assume that the text is entered in DOS mode-Cr/LF) 7) Remove the HTML Tag: replace ^ {<*> ^} ^ {<* ^ p *> ^} with an empty string 8) to delete all <A>: replace <[] ++ A * [] ++ href [] ++ = *> with Null String 9. Delete the first two columns of characters specified in the text: replace % ?? Empty string 10) insert 2 blank characters After column 4th: replace % ^ (???? ^) ^ (? ^) Is "^ 1 ^ 2" 11) Find All numbers: [0-9] + [.] + + [0-9] + 12) Find all words: [A-Z] + 13) Find all urls: http: // [a-z0-9 ^ ~ '_./^-^? = &] + Ultraedit Regular Expression (ultraedit syntax) % 1 search for rows starting with 1 $ search for rows ending with 1? Match single character * match multi-character te + st match "test", "teest", "teeeest", etc. but does not match "TST ". te ++ st matches "test", "teest", "teeeest", and "TST. but does not match. ^ P New Line (DoS Files format) ^ r new line (MAC files format) ^ n New Line (UNIX files format) ^ t Tab key [1-9] matches numbers from 1 to 9 [Linux]
Linux
Any word in [~ 0-9] Except for numbers, any word "^ {John ^} ^ {Tom ^}" is selected to search for John and Tom, such as John sdfasdf Tom, excluding sdfasdf, here, ^ {and ^} are examples of their own separators:
1: replace all characters After spaces or tabs (this is often used when getting the column name of a field, because the information displayed in the DESC column drops the column type out of the column name, column null constraints and column comment information ):Command: Replace [^ t] + * $ with null
1.1: Before replacement, Figure 1.1:
1.2: Call out the replacement window with crtl + R, and then press the input below to replace the window, as shown in Figure 1.2 (Note: select the regular expression here, which is not checked by default ):
1.3: After replacement, Figure 1.3:From the result of replacement, it indicates that the search sequence starts from the beginning to the end, and the replacement starts from the first character location. According to this recursion, when we want to replace the content after a specific string with a specific content or null, we only need to replace % * {Specific string} with null.
2. replace all content with spaces or tabsOperation: replace % * [^ t] with null
2.1 before replacement, 1.1
2.2 After replacement, figure 2.2:
According to this recursion, when we want to replace the content before a specific string with a specific content or null, we only need to replace {Specific string} + * $ with null.
3. Empty rows or rows that only contain spaces and Tab keysOperation: replace % [^ t] ++ ^ P with null.
3.1: Before replacement, Figure 3.1:
3.2: After replacement, Figure 3.2:According to this recursion, if you want to delete rows containing only specific strings, you can also replace % {Specific string} ++ ^ P with null.
4. Add a semicolon at the end of the rowOperation: Replace $;
4.1: Before replacement, 1.1.
4.2: After replacement:
5. Add four spaces at the beginning of the row:Operation: replace % with four spaces or use the column Block Mode of UE
5.1: Before replacement, 1.1
5.2: After replacement, figure 5.2:
6. Delete the line containing the varchar string:Operation: replace % * varchar * ^ P with null.
6.1: Before replacement, 1.1
6.2: After replacement, Figure 6.2:
7. Separate the strings with commas (,) for branch processing.Operation: replace; with; ^ P
7.1: Before replacement, Figure 7.1:
7.2: After replacement, Figure 7.2:Conclusion: The above are some common ue Regular Expression applications. In my work, I often create or modify
Database
Object
SQL
Language
It brings great routine to our daily work. For Linux, UNIX, and Oracle
In versions after 10 Gbit/s, there is support for regular expressions, which are similar in syntax. Using Regular Expressions will bring great convenience to log text processing and string matching. If you want to do your best, you must do your best.
. Regular Expressions are one of the essential means of our daily work.