Batch Fuzzy Search and Delete Keywords in Word: Method for Cleaning Document Content with Regular Expressions


TranslationEnglishFrançaisDeutschEspañolæ—„æœŹèȘží•œê”­ì–ŽïŒŒUpdate Time2026-06-11 09:23:34

Disclaimer: All images, text, and video content on the website are for reference only and may not be the latest, correct, or accurate. In case of any dispute, please refer to the actual experience effect!

When batch cleaning Word documents, if the content to be deleted is not fixed words but rather patterned text such as uppercase abbreviations, consecutive numbers, or serial numbers, using regular expressions will be more efficient. This article, combined with the operation interface of HeSoft Doc Batch Tool , explains how to access Word tools, import multiple docx files, select the formula fuzzy search in the "Find and Replace Keywords in Word" function, input rules such as [A-Z]{3}, \d+, and leave the replacement list blank to achieve batch deletion. It is suitable for office workers to batch clean documents, templates, and reference files.

When batch organizing Word documents, the most headache-inducing part is often not editing a single file, but repeatedly processing many files. For example, there are multiple docx documents in the same folder, and each document contains some keywords, abbreviations, numbers, or digits that need to be deleted. These contents are sometimes not exactly the same words, but follow the same format. If you continue to manually open Word, find, delete, and save each one, it’s not only inefficient but also prone to omissions.

This article introduces a more suitable approach for office batch processing: using HeSoft Doc Batch Tool , through the “Find and Replace Keywords in Word” feature, combined with regular expressions for fuzzy searching, and leaving the replacement content blank, thereby achieving batch deletion of keywords in Word.

This article will explain the complete process with screenshots, including applicable scenarios, before-and-after effects, operation steps, and precautions. The example deals with multiple docx files, targeting the deletion of three-letter uppercase abbreviations and consecutive numbers, such as BOT, ELA, 60, etc.

Applicable Scenarios: Word Keywords to Be Deleted Are Patterned but Not Fixed

If the content you want to delete is exactly the same, such as deleting the phrase â€œć†…éƒšè”„æ–™â€ from all documents, a standard exact search can accomplish it. However, if the content to be deleted is not identical, such as different numbers, digits, or English abbreviations, using regular expressions is more suitable.

The value of regular expressions lies in “rule-based searching.” It doesn’t just match one specific word but matches a group of texts that meet certain conditions. For Word batch fuzzy search and delete, this is very important.

Common use scenarios include:

  • Batch deleting consecutive numbers in multiple Word documents;
  • Batch deleting English abbreviations or codes in docx files;
  • Batch cleaning course numbers, project numbers, and system tags in templates;
  • Batch deleting useless fields in exported documents;
  • Batch processing of regular sensitive information in contracts, materials, lecture notes, and reports.

In this example, [A-Z]{3} is used to match three consecutive uppercase letters, and \d+ is used to match consecutive numbers. With these two rules, content like BOT, ELA, and 60 can be located in the documents in batch.

Effect Preview: Changes in Word Documents Before and After Processing

Before Processing: Multiple Word Files Awaiting Cleanup

The image below shows the file list before processing. The current folder contains 6 Word files, from 1.docx to 6.docx. This indicates that the task is not processing a single document but a typical batch document cleaning scenario.

image-Word batch fuzzy search,regular expression cleanup for Word,batch delete docx keywords

In the Word page before processing, you can see the content to be cleaned up marked by red arrows: the title starts with BOT, and the body contains ELA and 60. These contents are distributed in different positions, and manual cleanup would require locating and removing each one individually, which is very time-consuming.

image-Word batch fuzzy search,regular expression cleanup for Word,batch delete docx keywords

After Processing: Rule-Matched Content Has Been Deleted

Checking the document after processing, you can see that the original BOT, ELA, and 60 are no longer displayed. The title becomes the content after removing BOT, and the numbers and abbreviations in the body have also been cleaned up. Since the replacement content is empty, the matched text is directly deleted.

image-Word batch fuzzy search,regular expression cleanup for Word,batch delete docx keywords

This result shows that batch deletion does not necessarily require inputting each keyword one by one. As long as the content to be deleted can be described by rules, it can be accomplished in batch using regular expressions.

Operation Steps: How to Use HeSoft Doc Batch Tool to Complete Deletion

Step 1: Find the Find and Replace Feature in Word Tools

Open HeSoft Doc Batch Tool , and select Word Tools in the left function bar. The right side will display multiple Word-related batch processing functions, such as adding watermarks, deleting pictures, format processing, etc. This time, you need to click on “Find and Replace Keywords in Word”.

image-Word batch fuzzy search,regular expression cleanup for Word,batch delete docx keywords

From the function name, it can be seen that it is used to batch find and replace keywords in Word file content. For deletion tasks, you only need to leave the “replacement keyword” blank to achieve the deletion effect.

Step 2: Add or Import Multiple Word Files

After entering the “Find and Replace Keywords in Word” page, the first step is to select the records to be processed. At the top of the interface, there are two main buttons: Add Files and Import Files from Folder.

image-Word batch fuzzy search,regular expression cleanup for Word,batch delete docx keywords

If you are only processing a few files, you can click “Add Files”; if you want to process multiple Word documents in an entire folder, it is recommended to click “Import Files from Folder.” The screenshot has already imported 6 docx files, showing the file paths and extensions for easy confirmation of the processing targets.

After confirming everything is correct, click Next at the bottom of the page. The expected result of this step is that all Word documents needing batch cleanup have been added to the task list.

Step 3: Set Search Method to Formula Fuzzy Search

After entering the processing options page, select Use formula to fuzzy find text in “Search Method.” This option is checked in the screenshot. The fuzzy search here is suitable for matching content using rules, which is the regular expression deletion discussed in this article.

image-Word batch fuzzy search,regular expression cleanup for Word,batch delete docx keywords

If “Exact search for text” is selected, it is usually suitable for finding fixed words; whereas in this example, we are looking for a type of text, such as three uppercase letters or consecutive numbers, so formula fuzzy search must be selected.

Step 4: Enter the Regular Expressions to Be Deleted

Enter the rules in the “Keywords to Find List.” The two rules in the screenshot are:

  • [A-Z]{3}: Matches three consecutive uppercase English letters;
  • \d+: Matches consecutive numbers.

These two rules cover BOT, ELA, and 60 in the sample documents. The software will use these rules to batch find matching content in the imported 6 docx files.

If your documents need to delete other formats, you can adjust the rules based on the actual situation. For example, to delete a number with a fixed prefix, you would need to write a more specific rule. The more accurate the rules, the safer the batch deletion.

Step 5: Leave the Replacement Keyword List Empty

On the right is the “Replacement Keyword List.” The screenshot clearly prompts “Leave empty to delete.” Therefore, to delete the matched content, do not enter any replacement text on the right.

The purpose of this step is very clear: let the software replace the content matched by the left-hand rules with an empty value. The final effect is that these contents in the Word documents are deleted.

Step 6: Proceed to Subsequent Process and Execute

After completing the settings, click the Next button at the bottom. According to the process flow at the top of the page, the subsequent steps will be “Set Save Location” and “Start Processing.” Follow the interface prompts to set the save path, then start executing the batch task.

It is recommended to save the processed files to a new location instead of directly overwriting the original files. This makes it easy to check the results and keep the original documents as a backup.

Common Questions and Precautions

1. How should regular expression rules be verified?

The safest way is to test with a small number of files first. For instance, import 1 or 2 docx files, view the results after processing, confirm there are no accidental deletions, and then perform batch processing on all files.

2. Will [A-Z]{3} only delete BOT and ELA?

No. It will delete all sequences of three consecutive uppercase letters. Therefore, if the document contains other three-letter uppercase abbreviations, they may also be matched. Confirm whether all such content can be deleted before use.

3. What should I pay attention to when deleting numbers?

\d+ matches consecutive numbers, which is quite broad in scope. If the Word document contains years, page numbers, amounts, IDs, etc., that should not be deleted, it needs to be used cautiously or replaced with a more precise rule.

4. Why save to a new folder?

Batch processing is very efficient, but if the rule settings are inaccurate, it can quickly affect many files. Saving to a new folder keeps the original files available for comparison and recovery.

5. What file formats are suitable for this method?

The screenshot example uses docx files. For common Word documents, it is recommended to test the processing effect with the docx format first. If older doc files are involved, verify with a small number before executing in batch.

Summary: Boosting Word Batch Cleanup Efficiency with Regular Expressions

When multiple Word documents contain regular content that needs to be deleted, using regular expressions for batch fuzzy searching is more efficient than manual deletion one by one. Through HeSoft Doc Batch Tool , you can select “Find and Replace Keywords in Word” in Word Tools, import multiple docx files, choose “Use formula to fuzzy find text,” enter matching rules, and leave the replacement list empty, thereby achieving batch deletion.

This method is particularly suitable for office workers processing large volumes of materials, template documents, course files, project files, and batch-exported Word content. It is recommended that you prepare a backup or test sample before formal processing, confirm the rules are correct, and then run the batch operation, letting the software do the repetitive work, and leaving your time for tasks that require judgment and review.


KeywordWord batch fuzzy search , regular expression cleanup for Word , batch delete docx keywords
Creation Time2026-06-11 09:23:19

Disclaimer: All images, text, and video content on the website are for reference only and may not be the latest, correct, or accurate. In case of any dispute, please refer to the actual experience effect!

Related Articles

Don't see the feature you want?

Provide us with your feedback, and after evaluation, we will implement it for free!