When multiple Word, docx, or doc documents contain similar numbering, abbreviations, fixed-format codes, or other content that needs to be uniformly deleted, it is very time-consuming to open each file and manually find and replace. This article uses HeSoft Doc Batch Tool as an example to demonstrate how to use the "Find and Replace Keywords in Word" feature, utilize regular expressions to perform fuzzy matching of keywords, and leave the replacement content blank, thereby batch-deleting specified text patterns in multiple Word files. It is suitable for scenarios such as document cleanup, data desensitization, and batch formatting.
When organizing a large number of Word documents, you often encounter repetitive but not completely identical content that needs to be deleted, such as English uppercase abbreviations, numerical codes, course numbers, batch numbers, page numbers, or other text following fixed patterns. If you open docx and doc files one by one to manually find and replace, it's not only inefficient but also easy to miss deletions. By leveraging the batch processing capabilities in office software, you can use regular expressions to perform fuzzy matching on multiple Word files and leave the replacement content empty, achieving batch deletion of keywords.
The following uses " HeSoft Doc Batch Tool " in the screenshot as an example to demonstrate how to use the "Find and Replace Keywords in Word" feature to batch delete content matching regular expressions across multiple Word documents.
Applicable Scenarios
This method is suitable for handling Word content where "the keywords are not completely fixed but have obvious patterns." For example:
- Batch deleting English uppercase abbreviations in multiple Word documents, such as BOT, ELA, etc.
- Batch deleting numerical content in documents, such as 60, 2026, 001, etc.
- Cleaning up numbers, codes, temporary markers, or formatting placeholders in docx and doc files.
- Reducing repetitive operations in scenarios like data archiving, document desensitization, contract template cleaning, and teaching material organization.
In this article's example, the 6 Word documents in the same folder need to be processed.

Effect Preview: Before and After Processing
Before Processing: Keywords Matching Patterns Exist in Multiple Word Files
In the Word documents before processing, you can see that the titles and body text contain some content that needs to be deleted, such as the English uppercase abbreviations "BOT", "ELA", and the number "60". If such content is scattered across many files, manual deletion would be very tedious.

After Processing: Content Matched by Regular Expressions is Batch Deleted
After processing is complete, the content that originally matched the rules has been deleted. For example, "BOT" in the title has been removed, and "ELA" and the number "60" in the body text are no longer displayed. Because the keyword list after replacement is empty, the software directly deletes the matched text.

Operating Steps: Using Regular Expressions to Batch Fuzzy Delete Word Keywords
Step 1: Enter the Word Tool and Select the Find and Replace Function
Open HeSoft Doc Batch Tool , and select "Word Tools" on the left. Find and click "Find and Replace Keywords in Word" in the tool list. This function is used to batch find and replace keywords in Word file content, and batch deletion can also be achieved by leaving the "replace with" content empty.

The purpose of this step is to enter the functional module specifically for processing Word text find-and-replace, preparing for importing multiple docx or doc files later.
Step 2: Add the Word Files That Need to Be Processed
After entering the function page, click "Add Files" or "Import Files from Folder" to add the Word documents that need batch processing to the list. In the screenshot, 1.docx through 6.docx have been imported, totaling 6 records. The table shows information such as file name, path, extension, creation time, and modification time.

After confirming the file list is correct, click "Next" at the bottom. If files were added by mistake, you can remove them via the delete operation in the list to avoid processing documents that should not be modified.
Step 3: Set Up Using Regular Expressions for Fuzzy Text Search
On the "Set Processing Options" page, select "Use formula for fuzzy text search" as the search method. As seen from the rule writing in the screenshot, this is where you input matching rules similar to regular expressions, for example:
- [A-Z]{3}: Matches 3 consecutive uppercase English letters, useful for deleting abbreviations like BOT, ELA.
- \d+: Matches one or more digits, useful for deleting numerical content like 60, 2026, 001.
In the "Keyword List to Find," enter the matching rules line by line. Keep the "Keyword List After Replacement" on the right empty, as the interface prompts "Leaving empty means deletion." This means the software will find content matching the rules on the left and delete that content directly.

After completing the settings, click "Next" to proceed with setting the save location and starting the process. Since subsequent page screenshots are not shown, in actual operation, just follow the software wizard prompts to complete "Set Save Location" and "Start Processing."
Recommendations for Writing Regular Expressions
When batch deleting Word keywords, regular expressions should be as precise as possible to avoid accidentally deleting normal body text. Here are some common approaches:
- To delete consecutive numbers: You can use \d+.
- To delete 3 consecutive uppercase letters: You can use [A-Z]{3}.
- To delete numbers with a fixed prefix: You can combine letter and digit rules based on the actual content.
- When only wanting to delete a specific type of format, avoid using overly broad expressions.
If the document content is complex, it is recommended to first test with a small number of Word files, and only proceed to batch process all docx or doc files after confirming the results meet expectations.
Common Questions and Precautions
1. Why does leaving the replacement content empty delete items?
In find-and-replace logic, "Find content" indicates the text to locate, and "Replace content" indicates what to replace it with. If the keyword list after replacement is not filled in, the software interface prompts "Leaving empty means deletion," so the matched content will be replaced with nothing, i.e., deleted.
2. Could the regular rules accidentally delete other content?
Yes, it's possible. For example, \d+ will match all numbers. If page numbers, years, or quantities in the body text also match the rule, they might be deleted together. Therefore, before batch processing Word documents, be sure to check if the rules are too broad.
3. Can both doc and docx files be processed using this approach?
The screenshot examples in this article are docx files. For batch processing of Word documents, you can usually import corresponding files based on the file formats supported by the software. During actual operation, please refer to the recognized extensions and import results in the tool list.
4. Should I back up files before batch processing?
It is recommended to back up the original files first, especially when batch deleting content. This way, even if the regular expression settings are inaccurate, you can revert to the original version and reprocess them.
Summary
Using regular expressions to batch fuzzy delete keywords in Word can transform the repetitive labor of opening, finding, and deleting items one by one into a single rule-setting and batch execution process. For document cleaning, content desensitization, and data organization involving large numbers of docx and doc files, this type of office software can significantly reduce manual operation time and lower the risk of missed deletions.
If you are handling numbers, abbreviations, numbers, or other patterned text in multiple Word files, you can follow the steps in this article: Select "Find and Replace Keywords in Word," import files, enable fuzzy search rules, leave the replacement content empty, and then batch complete the deletion.