Home  >  Article  >  Topics  >  Sharing practical Word skills: cleverly use 'Find and Replace” + 'Wildcard” to extract data

Sharing practical Word skills: cleverly use 'Find and Replace” + 'Wildcard” to extract data

青灯夜游
青灯夜游forward
2022-05-18 10:19:568326browse

In the previous article "Practical Word Tips Sharing: Clever Use of "Wildcards" to Batch Insert Tables", we learned how to use Word wildcards to batch insert tables. Today we will continue to share practical Word skills. Let’s talk about how to use “Find and Replace” and “Wildcard” to extract data. Learn it quickly!

Sharing practical Word skills: cleverly use 'Find and Replace” + 'Wildcard” to extract data

Yesterday, one of our friends left a message in the background and asked this question: the product name and model are mixed together, how to quickly extract the product name, that is, only keep Chinese characters.

Sharing practical Word skills: cleverly use Find and Replace” + Wildcard” to extract data

Today I will take the opportunity to answer this question and share with you several ways to extract text in Word. You can use Word’s ‘wildcard’ function to assist in data extraction.

1. Extract Chinese characters

Tips: Press the [Ctrl H] key to open the "Find and Replace" dialog box and click "More " button, check "Use wildcards" in the search options, enter [a-z,A-Z,0-9] in the search content, click "Replace All", that is, replace all letters and numbers, and only retain Chinese characters.

Sharing practical Word skills: cleverly use Find and Replace” + Wildcard” to extract data

Chinese characters can be extracted according to the above method. If you only need numbers or English, how to extract them?

In fact, the extraction method of numbers and English is similar to the extraction method of Chinese characters, but there is a difference when entering the search content.

2. Extract numbers

Tips: Enter [!0-9] in the search content, where the exclamation mark is the logical NOT operator , indicating all parts except 0-9. Click the "Replace All" button to replace all non-numeric content, leaving only numbers.

Sharing practical Word skills: cleverly use Find and Replace” + Wildcard” to extract data

3. Extract English

Tips: Enter [!a-z,A-Z] in the search content ,where the exclamation point is the logical NOT operator, representing all parts except a-z, A-Z. Then click the "Replace All" button to replace all non-English letter content and keep only letters.

Sharing practical Word skills: cleverly use Find and Replace” + Wildcard” to extract data

Final effect:

Sharing practical Word skills: cleverly use Find and Replace” + Wildcard” to extract data

【Today’s Interaction】

If I need to extract numbers and English at once and remove Chinese characters. How should I do this? How to fill in the search content? do you know? Welcome to leave a message at the end of the article to discuss and learn from each other!

Sharing practical Word skills: cleverly use Find and Replace” + Wildcard” to extract data

#Word Search and Replace The wildcard function is a bit like regular expressions and is very powerful. Here are just a few tips. You can study it yourself!

Recommended tutorial: "Word Tutorial"

The above is the detailed content of Sharing practical Word skills: cleverly use 'Find and Replace” + 'Wildcard” to extract data. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:itblw.com. If there is any infringement, please contact admin@php.cn delete