Use a regular expression in ultraedit

Source: Internet
Author: User
Tags ultraedit
Delete empty rows: replace % [^ t] ++ ^ P with empty strings.

Remove trailing space: Replace [^ t] + $ with an empty string

Space at the beginning of the row to be deleted: % [^ t] + is replaced with an empty string

Each line starts with four fixed spaces: replace % [^ t] ++ ^ ([~ ^ T ^ p] ^) is "^ 1"

Each segment starts with a fixed 4-digit space: replace % [^ t] + ""
(If a line starts with a space, it is regarded as the starting line of a segment)

Merge a segment into one row: Replace [^ t] ++ ^ P ^ ([~ ^ T ^ p] ^) is ^ 1
(Note: here we assume that the text is a line break in DOS mode-Cr/LF)

Remove HTML Tag: replace ^ {<*> ^} ^ {<* ^ p *> ^} with an empty string.

Delete all <A>: replace <[] ++ A * [] ++ href [] ++ = *> with an empty string.

Delete the first two columns of characters specified in the text: replace % ?? Empty string

Insert 2 blank characters after the first column: replace % ^ (???? ^) ^ (? ^) Is "^ 1 ^ 2"

Search for all numbers: [0-9] + [.] ++ [0-9] +

Find all words: [A-Z] +

Find all urls: http: // [a-z0-9 ^ ~ '_./^-^? = &] +

Note: to replace the regular expression, you must check the regular expression option.

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.