If multiple Word documents simultaneously contain English abbreviations, numerical codes, or template residual information, manual deletion is inefficient and prone to omission. This article uses a practical example to explain how to import multiple docx files in HeSoft Doc Batch Tool , use the "Find and Replace Keywords in Word" function, select formula fuzzy search, and use regular expression rules such as [A-Z]{3}, \d+ to replace the matching content with empty, thereby completing batch deletion.
When working with Word documents, course materials, report templates, or system-exported docx files, many people encounter the problem of repetitive cleanup: each file contains some English abbreviations, numerical codes, or temporary identifiers that don't need to be kept, but these items aren't identical across files. For example, one document might contain "BOT," another "ELA," and yet another a number like "60." Manually deleting these is manageable for one or two files, but if you have dozens or even hundreds of Word documents, manually searching and replacing each one becomes extremely inefficient.
This article addresses this exact type of problem: how to use regular expressions to batch delete keywords from many Word, docx, or doc documents in a fuzzy manner. The example uses HeSoft Doc Batch Tool , an office software designed for batch document processing scenarios, which consolidates repetitive Word operations into a single task, reducing the workload of manually opening, searching, deleting, and saving files.
Applicable Scenario: Batch Cleaning Non-Fixed but Patterned Content in Word
If the content to be deleted is completely fixed—for example, if every document contains the phrase "test text"—then a standard exact find-and-replace can handle it. However, in many office documents, the content needing cleanup is not fixed but follows certain patterns. In such cases, regular expressions are more suitable.
In this case study, the content to be processed falls into two main categories: one is three-character uppercase English abbreviations, such as BOT and ELA; the other is consecutive numbers, like 60. Their positions vary across different files and paragraphs, but their format patterns are consistent. Therefore, regular expression rules can be used to describe them for batch deletion.
This method is suitable for the following office scenarios:
- Batch deleting department codes, course codes, or project abbreviations from Word documents.
- Cleaning up numerical durations, serial numbers, temporary marks, or export numbers in docx files.
- Uniformly processing multiple document templates to remove unwanted placeholders and codes.
- Batch removing internal identifiers, abbreviations, or certain structured fields before sending materials externally.
- Applying the same find-and-replace rules across multiple Word files to avoid manual omissions.
It must be emphasized that while regular expressions are highly efficient, rules should be set carefully. Broader rules match more content; more precise rules lower the risk of accidental deletion. It is highly recommended to test with a small sample of documents before batch processing.
Before Processing: Many Files, Content Contains Abbreviations and Numbers
From the file screenshot before processing, we can see the target folder contains multiple Word documents, named 1.docx through 6.docx. Although the example only has 6 files, in real-world office scenarios, such operations often need to be scaled to many more documents. The more files there are, the more apparent the value of a batch processing tool becomes.

Looking inside the Word documents, the titles and body text contain several items that need to be deleted. BOT, ELA, and 60, pointed out by red arrows, are the targets for this operation. They are not the same fixed string, so a single standard find operation will not suffice.

A manual approach would involve opening 1.docx, searching for BOT and deleting it, searching for ELA and deleting it, searching for 60 and deleting it, saving, and closing. Then, you would repeat the same process for 2.docx, 3.docx, and so on. This is not only slow but also prone to errors, as content differences between documents can cause you to miss some instances. By using the batch find-and-replace function, you only need to set the rule once, and the software will execute it automatically across the file list.
After Processing: Matched Keywords Are Deleted, Body Text Is Preserved
The processed screenshot shows that the "BOT" previously in the title has disappeared, and the "ELA," "60," and similar items in the body text have also been cleaned up. The document's paragraphs, main text, and overall structure are retained; only the keywords matching the rules have been deleted.

This demonstrates that the operation was not a simple deletion of a specified word, but a fuzzy match based on regular expressions. For instance, [A-Z]{3} is used to match three uppercase English letters, and \d+ is used to match consecutive digits. Replacing these matched results with nothing achieves the effect of batch deletion.
Step 1: Enter the Word Tools on the Software Homepage
After opening HeSoft Doc Batch Tool , you will see several tool categories on the left, such as Word Tools, Excel Tools, PowerPoint Tools, PDF Tools, etc. Since our target files are Word documents, select "Word Tools" on the left.
In the list of Word tools, find "Find and Replace Keywords in Word." In the screenshot, this function is listed first, indicating it is used for batch finding and replacing keywords within Word file content. Deleting keywords, as we are doing here, is essentially a form of replacement: replacing the matched content with nothing.

The advantage of entering this function is that it allows you to manage multiple Word documents as a single batch processing task. Compared to the manual method of opening files one by one, batch processing software integrates rule setting, file import, and execution into a complete workflow, reducing repetitive manual steps.
Step 2: Import Multiple Docx Files and Confirm the List
After entering the function page, the first step is to select the records to be processed. The upper-right area of the page provides two entry points: "Add File" and "Import Files from Folder." According to the screenshot, this example has already imported 6 docx files, located in the D:\test directory.

In the file list, you can see each file's serial number, name, path, extension, creation time, and modification time. This list is very important because the batch processing will be executed against the files in this list. If incorrect files are imported accidentally, the subsequent rules will also apply to them.
It is recommended to check the following three points before clicking "Next":
- Is the file count correct? For example, the bottom of the screenshot shows a record count of 6.
- Do the file extensions match expectations? In this case, they are all docx.
- Are the paths correct to avoid processing identically named files in other directories?
Once confirmed, click "Next" at the bottom to proceed to the keyword and regular expression rule settings page.
Step 3: Enable Formula-Based Fuzzy Search and Enter Regular Expression Rules
The second step is "Set Processing Options." In the "Search Method" area, the screenshot shows that "Use formula for fuzzy text search" is selected. This step is the key to the entire tutorial, as only by enabling fuzzy search can you use rules similar to regular expressions to match a class of text.

In the "List of Keywords to Find" on the left, the example has two rules entered:
- [A-Z]{3}
- \d+
[A-Z]{3} can be understood as matching three consecutive uppercase English letters. In the Word documents from the screenshot, both BOT and ELA fit this rule and will be matched. \d+ can be understood as matching a consecutive sequence of digits, such as 60. With these two rules, we can simultaneously process English abbreviations and numbers.
If your actual needs differ, you can adjust the rules based on the content pattern. For example, to delete only two-letter uppercase abbreviations, use the corresponding length rule; to delete a specific format of serial numbers, the expression should be written more precisely. This article will not expand on more regular expression syntax; the key is to understand that the left-hand list should contain the patterns you want to find.
Step 4: Leave the Replacement List Blank to Indicate Deletion
In the "List of Keywords After Replacement" area on the right, the screenshot provides a clear prompt: "Leaving blank means delete." This means that if a rule on the left matches content and no replacement text is entered on the right, the software will remove the matched content.
Therefore, to achieve batch deletion in this example, do not enter new keywords on the right. Keep the replacement content empty. This way, when the software finds items like BOT, ELA, or 60 in the Word documents, it will delete them.
It's important to note the difference between "empty" (nil) and "a space character." Empty means not filling in any replacement content, typically used for deletion. A space is an actual character; if you type a space, it might leave unwanted whitespace in the document. To achieve the cleanup effect shown in the screenshot, the replacement content should remain unfilled.
Step 5: Continue the Wizard, Set Save Location, and Execute
After setting the search rules and replacement method, click "Next." From the process flow at the top of the page, you can see that "Set Save Location" and "Start Processing" follow. Although the screenshots focused mainly on the first two steps, a complete batch processing task typically requires you to confirm the save location before starting execution.
It is not recommended to process important original files directly without a backup. A safer practice is to make a copy of the original Word documents first, or select a new output directory in the save location settings. This way, even if a regular expression rule is too broad, you can revert to the original files and reprocess them.
Once processing begins, the software will handle the multiple Word files sequentially based on the import list. For 6 files, this method saves the time spent opening them individually; for several dozen docx documents, the time saved is more significant and also ensures consistent application of the rules.
FAQ: Key Considerations for Batch Deleting Word Keywords with Regex
1. What is the difference between fuzzy search and exact search?
Exact search is suitable for finding fixed text, such as deleting only "BOT." Fuzzy search is suitable for finding a class of text with a pattern, such as deleting all three-character uppercase English abbreviations. This article's example selected "Use formula for fuzzy text search" precisely to use rules to match multiple different keywords.
2. Why can [A-Z]{3} delete both BOT and ELA?
Because both BOT and ELA consist of three consecutive uppercase English letters, matching the rule [A-Z]{3}. Therefore, they are identified and deleted when the replacement content is left empty.
3. Will using \d+ to delete numbers affect the body text?
If the body text contains numbers that need to be preserved, \d+ might match them. Therefore, before formal batch processing, you should first confirm whether all numbers in the documents can be deleted. For sensitive content like dates, amounts, or serial numbers, it's advisable to use more precise rules or run a small-scale test first.
4. Why do some spaces or symbols remain after processing?
Regular expression rules only delete the matched text itself. For example, after deleting "BOT," any adjacent hyphens, parentheses, or spaces are not automatically removed. If you need to clean up these symbols as well, you should include them in the search rule, but this must be set carefully based on the actual document content.
5. Is a backup necessary before batch processing?
A backup is strongly recommended. Batch find-and-replace has a large impact zone when applied to multiple files. This is especially true when using regular expressions, as rules may match more content than expected. Backing up original files or outputting to a new folder is a safer office practice.
Summary: Using Regex and Batch Processing Tools to Boost Word Cleanup Efficiency
This article demonstrated, through a practical screenshot-based case study, how to batch delete fuzzy keywords from multiple Word documents. The overall process is not complicated: first, inside HeSoft Doc Batch Tool , enter "Word Tools" and select "Find and Replace Keywords in Word"; then import the docx files needing processing; next, choose "Use formula for fuzzy text search" and enter [A-Z]{3} and \d+; finally, leave the replacement content empty, continue to set the save location, and start processing.
For people who frequently work with Word, docx, and doc documents, the value of batch processing lies in reducing repetitive labor and ensuring rules are applied uniformly. This is especially true when the content to be deleted is not a fixed word but involves patterned text like English abbreviations, numerical codes, or code identifiers, as regular expressions can significantly improve processing efficiency. It is recommended to validate your rules on a few sample documents to confirm the effect matches expectations before batch-executing on a large number of files.