Word's powerful search substitution feature

Source: Internet
Author: User
Tags manual regular expression

Will program friends know the regular expression of the powerful flexible, in fact, this feature word also has, but very few people use. For example, replacing two newline characters for one, replacing all words that start with ABC, and finding multiple keywords at the same time, using Word to find wildcard characters in the replacement feature is a good choice.

  Word Wildcard usage Detailed

  one, any single character: “?” can represent any single character and enter a few "?" Represents a few unknown characters. Such as:

Input "? Country "can find such characters as" China "," America "and" Britain ";

Enter the??? Country "can find characters such as" Bangladesh ".

  Two, any number of characters: "*" can represent any number of characters. Such as:

Enter the "* country" to find the "China", "America", "Bangladesh" and other characters.

  Three, one of the specified characters: The characters in the [] box can be one of the characters that you specify to find, such as:

"China" and "the United States" can be found by entering the "[China-US] state". Another example:

Enter "Th[iu]g", you can find "thigh" and "thug".

Enter "[Learn Shuo] scholar", find will be bachelor, master, doctor.

Input "[Big small] learning" can find "university", "Middle school" or "primary school", but do not look for "study", "school" and so on.

Enter "[Height]", Word search tool can find "tall", "short" and other content.

  any single character within the specified range: [X-x] can specify any single character in a range, such as:

Enter ' [A-e]ay ' to find characters such as ' Bay ', ' Day ', and note that the characters in the specified range must be in ascending order. in ascending order. Such as:

If you enter [A-c]mend], the Word Lookup tool can find characters such as "amend", "Bmend", "Cmend", and so on.

  Excluding the specified fan, excluding any single character within the specified range:

"[!x-x]" can be used to exclude any single character within a specified range, such as:

Enter "[!c-f]" to find "bay", "gay", "lay" and other characters, but unequal characters, but will not find "Cay", "Day" and other characters. Note that the range must be in ascending order.

Another example:

If you enter [!A-C], Word programs can find target characters such as good, see, and these, and all content including characters A, b, and C will not appear in the lookup results.

Another example:

Enter "M[!a]st", used to find "mist" and "most" do not look for "mast".

Input "[!a]n", will be found in addition to all the possible combinations such as: in, on and so on.

  Six, specify the number of previous characters: ' {n} ' can be used to specify the number of characters you want to find that contain the previous character, such as:

Enter "Cho{1} SE" that contains 1 previous characters "O", you can find "chose", enter "Cho{2}se" that means 2 previous characters "O", can be found, "choose".

Another example:

Enter "Lit{1}le" that contains 1 previous characters "T" to find "litle".

Enter "Lit{2}le" that contains 2 previous characters "T" to find "little".

Enter "Te{2}n" to find "teen" and not find "ten".

Enter "Of{2}ice", where you will find office.

  Specify the previous character and specify a range of previous characters:

' {x,x} ' can be used to specify the range of characters before the character you want to find, such as:

If you enter "cho{1,2}", the number of "O" that contains the previous character is 1-2, you can find "chose", "choose".

  八、一个 above the preceding character: "@" can be used to specify that the character you want to find contains more than one previous character, such as:

Enter "Cho@se", you can find, "chose", "choose" and other characters.

  Nine, specify the starting string: "<" can be used to specify the starting string in the character to find, such as:

Enter

Enter

  10, the end of the specified string: ">" can be used to specify the ending string in the character to find, such as:

Enter "er>" to indicate that the character you want to find ends with "er", you can find "ver", "Her", "lover", and so on.

If you enter "En>", you will find all the target objects ending with "en" and you may find "ten", "pen", "men"

Enter "Up>" to find all target objects ending with "up", such as "Setup", "Cup", and so on.

  11. Expression Lookup: "()", especially for combination lookups of multiple keywords.

Type "America" (China) and type "2 1" in "Replace with" and word finds "America China" and replaces it with "Chinese America".

Enter "< (Jiangshan) * (Beauty) >" To find all the strings that start with "Jiangshan" and End With "beauty".

In addition, you can combine the above wildcard characters for a more accurate search, such as:

Enter "< (AG) * (er) >" To find all words that start with "AG" and End With "ER", and note that it is necessary to separate the different lookup rules with parentheses in the future. Finally, note that if you want to find characters that have been defined as wildcards, such as "*", "?" such as characters, you must precede the character with a backslash "", such as: enter "*" to indicate the lookup character "*".

  Clear the Use Fu box in Word, Excel , the wildcard usage instructions:

Any single character ^?

Any number: ^#

Any English letter: ^$

Paragraph mark: ^p

Manual line breaks: ^l

Graphics: ^g or ^1

1/4 Long dash: ^+

Long dash: ^j

Dash: ^q

tab characters: ^t

Caret Size: ^

Column break: ^v

Section break: ^b

Ellipsis: ^n

Full-angle ellipsis: ^i

No wide non-separator: ^z

No wide optional separator: ^x

nonbreaking space: ^s

nonbreaking hyphens: ^~

¶ Paragraph symbol: ^%

§ Section break: ^

Footnote mark: ^f or ^2

Optional hyphen: ^-

Blank area: ^w

Manual page Break: ^m

Endnote Mark: ^e

Domain: ^d

Unicode characters: ^unnnn

Full-width Spaces: ^u8195

Half-corner space: ^32 or ^u8194

Annotation: ^a or ^5

Paragraph mark: ^p

Manual line Feed ↓:^l

What to find:^&

Clipboard contents: ^c

Ellipsis: ^i

Full-angle ellipsis: ^j

tab characters: ^t

Long dash: ^+

1/4 long Dash (-): ^q

Dash (–): ^=

Caret Size: ^^

Manual page Break: ^m or ^12

Optional hyphen (_): ^-

nonbreaking hyphen (-): ^~

nonbreaking space: ^s

No wide non-separator: ^z

No wide optional separator: ^x

Column break: ^n

§ Section break: ^%

¶ Paragraph symbol: ^V

  When you use the Fu box in Word and Excel, use the wildcard instructions:

Any single character:?

Any number (single): [0-9]

Any English letter: [A-za-z]

Paragraph mark: ^13

Manual line breaks: ^l or ^11

Graphics: ^g

1/4 Long dash: ^q

Long dash: ^+

Dash: ^=

tab characters: ^t

Caret Size: ^^

Column break: ^n or ^14

Section break/page break: ^m

Ellipsis: ^i

Full-angle ellipsis: ^j

No wide non-separator: ^z

No wide optional separator: ^x

nonbreaking space: ^s

nonbreaking hyphens: ^~

Expression: ()

The end of the word:<

The beginning of the word:>

Any string: *

Specify any single character outside the range: [!x-z]

Specify any single character in range: [-]

More than 1 previous characters or expressions: @

n a previous character or expression: {n}

N more than one previous character or expression: {n,}

N to m previous character or expression: {n,m}

All lowercase English letters: [A-z]

All uppercase English letters: [A-z]

All Western characters: [^1-^127]

All Chinese characters and Chinese punctuation: [!^1-^127]

All Chinese characters (CJK Unified): [one-龥] or [a-﨩]

All Chinese punctuation: [! One-龥 ^1-^127]

All non-numeric characters: [!0-9]

The expression N to find:

Paragraph mark: ^p

Manual line Feed ↓:^l

What to find:^&

Clipboard contents: ^c

Ellipsis: ^i

Full-angle ellipsis: ^j

tab characters: ^t

Long dash: ^+

1/4 long Dash (-): ^q

Dash (–): ^=

Caret Size: ^^

Manual page Break/section break: ^m

Optional hyphen (_): ^-

nonbreaking hyphen (-): ^~

nonbreaking space: ^s

No wide non-separator: ^z

No wide optional separator: ^x

Column break: ^n

§ Section break: ^%

¶ Paragraph symbol: ^V

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.