Ultraedit is an alternative to notepad. Its advantage for notepad is self-evident. The following shows how to use a regular expression (wildcard) in ultraedit to find and replace common expressions.
Preparation: Before using a regular expression, you must set the regular expression.
1. Advanced-> Configuration-> Search-> Regular Expression Engine, select the ultraeidt-style Regular Expression
2. In the search and replace box, you must check the regular expression ".
A text file contains the following content:
[2012-01-29t00: 00: 09] [N ]: ****************************************
#### Total packets num 5584921854
#### Total un-packets num 4645790779
@ Unpack rate: 1.29598/s
[Api_fh_0] packets left: 0
[Api_fh_1] packets left: 0
[Api_fh_2] packets left: 0
[Api_fh_3] packets left: 0
[Api_fh_4] packets left: 0
[Api_fh_5] packets left: 0
[Api_ss_0] packets left: 0
[Api_ss_1] packets left: 0
[Api_ss_2] packets left: 0
[Api_ss_3] packets left: 0
[Api_ss_4] packets left: 0
[Api_s_5] packets left: 0
FH unpack rate: 100%
SS unpack rate: 100%
Mem: 290.8 MB, virtual mem: 429.8 MB, total: 720.6 MB.
I. Regular Expression search
"*" Indicates matching characters of any length. "?" Matches a character in length.
If you enter
The search result is:
If you enter:
The search result is:
Ii. Regular Expression replacement
The replaced wildcard uses the ultraedit-style wildcard, so the format is somewhat different from the search wildcard.
"^ (* ^)" Indicates that the replacement matches any length characters. "^ (? ^) "Indicates that the replacement matches a character of the same length.
For example, if the input is as follows:
The text content is replaced:
If the input is as follows:
The text content is replaced: