Ultraedit uses regular expressions (wildcards) for search and replacement.

Source: Internet
Author: User
Tags unpack expression engine ultraedit

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.