Wildcard characters for Word find and replace

Source: Internet
Author: User

Find and replace wildcard characters

to find

type

Example

Any single character

?

S?t can find "sat" and "set".

Arbitrary string

*

S*d can find "sad" and "started".

The beginning of a word

<

< (inter) can find "interesting" and "intercept", but cannot find "splintered".

The end of a word

>

> can find "in" and "within", but cannot find "interesting".

One of the specified characters

[ ]

W[io]n can find "win" and "won".

Any single character within this range

[-]

[R-t]ight can find "right" and "sight". The range must be ascending.

Any single character other than the characters in the range within the parentheses

[!x-z]

T[!a-m]ck can find "tock" and "tuck", but cannot find "tack" or "tick".

N repeated previous characters or expressions

{n}

Fe{2}d can find "feed", but cannot find "fed".

At least n first character or expression

{n,}

Fe{1,}d can find "fed" and "feed".

N to M first character or expression

{n,m}

10{1,3} to find "10", "100" and "1000".

One or more of the preceding characters or expressions

@

[email protected] to find "lot" and "loot".

find two words: (<*>) space (<*>) "This is a text" can be found "This is" "is a" "a text" followed by a space to find
an asterisk (*) returns all the text in the word.
(< >) marks the beginning and end of each word, respectively. Returns a single word.
the brackets and spaces between them split the word into different groups: (the first word) (the second word).
to be replaced by: \2, \1 "is, this"
a slash (\) is placed together with a number to act as a placeholder. (You can also use a slash to find other wildcard characters.) See the next section for more information. )

Find two words: (<*) spaces ([! Space]@) ^13 found: "The beginning of this is a text line break"
To be replaced by: \2, Space \1^p "text, this is a"

28th May 2003
Lookup: ([0-9]{1,2}) ([Dhnrst]{2}) space (<[ADFJMNOS]*>) space ([0-9]{4})
Replace: \3 space \1, Space \4 May, 2003

Wildcard characters for Word find and replace

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.