Home > Software Tutorial > Office Software > How to use word replacement to delete spaces in mixed Chinese and English documents

How to use word replacement to delete spaces in mixed Chinese and English documents

WBOY
Release: 2024-04-26 16:49:34
forward
808 people have browsed it

Abstract: In mixed Chinese and English documents, it is often necessary to delete spaces in the document. PHP editor Apple has brought a detailed solution to this problem, guiding everyone on how to use word to delete spaces in mixed Chinese and English documents. Below, we will introduce the specific steps in detail to help you solve this problem.

Click [Edit] → [Replace] to open the [Replace] tab in the [Find and Replace] dialog box, click the [Advanced] button and check [Use] in the [Advanced] option list Wildcard] item, and then enter [[a-zA-Z]{1,33} {1,33}] in the [Find content] box ([a-zA-Z] means anything within the specified range of uppercase and lowercase letters A single character, but note that the range must be expressed in ascending order. {1,33} means 1 to 33 previous characters or expressions. The 33 here is randomly specified because some letters in English words are repeated. Some documents have multiple consecutive spaces, so a large number of 33 is specified to ensure sufficient space. ), enter [^&] in the [Replace with] box (^& means the content in the search content box).

Please click the [Replace with] box, click the [Format] button to open the format list, and click the [Font] command in the list to open the [Replace Font] dialog box, and then click the [Replace] dialog box In the [Font] tab in the box, set the font color to [Red] and click [OK] to return to the [Find and Replace] dialog box. Click the [Replace All] button to see that all English words have Where there are spaces, the words before the spaces turn red, because the spaces after these red words cannot be deleted.

How to use word replacement to delete spaces in mixed Chinese and English documents

Open the [Find] tab in the [Find and Replace] dialog box again, and enter [^? 】(^? represents any character without using wildcards.), and check "Highlight all items found in this range", then click the "Format" button and click the "Font" command in the format list to open " In the [Find Font] dialog box, set the font color to [Auto] in the [Font] tab and click [OK]. Return to the [Find and Replace] dialog box and click the [Find All] button. All content except the red text and the spaces following it are selected, which delimits the range for the next step of replacing the spaces.

Click [Edit] → [Replace] to open the [Replace] tab in the [Find and Replace] dialog box again, enter a space in the [Find What] box, and what is in the [Replace with] box Don't fill it in either. Then position the cursor in the [Find content] and [Replace with] input boxes respectively, and click the [Unrestricted format] button to cancel the previously set format restrictions. Finally, click the [Replace All] button, but note: When a dialog box pops up and prompts [Do you want to continue searching the rest of the document], be sure to click [No], otherwise the spaces in the English words will also be replaced. In this way, all extra spaces in the document will be deleted.

How to use word replacement to delete spaces in mixed Chinese and English documents

Finally, press the Ctrl A shortcut key to select all documents and uniformly set the document content - just set the font color.

The above is the detailed content of How to use word replacement to delete spaces in mixed Chinese and English documents. For more information, please follow other related articles on the PHP Chinese website!

source:zol.com.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template