This article explains how to use HeSoft Doc Batch Tool to batch find and replace keywords across multiple Word and docx documents using regular expression wildcard formulas. The example replaces multiple three-letter uppercase English abbreviations with A, and consecutive numbers with B. This is suitable for handling contracts, course materials, reports, template documents, and other scenarios requiring batch standardization of text content, reducing the repetitive labor of opening files one by one to find and replace.
In daily office work, many people encounter similar problems: a folder contains dozens or even hundreds of Word documents, each with keywords, numbers, abbreviations, amounts, years, or fixed-format text that needs to be replaced. If you open each docx file individually and use Word's built-in find and replace function to process them manually, it is not only time-consuming but also prone to omissions. Especially when the content to be replaced is not a fixed word, but a category of text that follows a pattern, such as three uppercase letters, consecutive numbers, course codes, contract numbers, etc., ordinary find and replace is not flexible enough.
This article aims to solve this problem: using the "Find and Replace Keywords in Word" function in the office software " HeSoft Doc Batch Tool ", batch find keywords in multiple Word files through regular expression wildcard formulas and replace them uniformly according to rules. In the screenshot example, three uppercase letters in multiple docx files are replaced with A, and consecutive numbers are replaced with B, thus achieving batch, automatic, and rule-based Word content replacement.
Applicable Scenarios: Which Word Documents Are Suitable for Batch Replacement Using Regular Expressions
Regular expression wildcard replacement is suitable for processing Word documents where the "content has patterns, but the specific text is not completely identical." For example, if some documents contain English abbreviations like BOT, ELA, BUDS, although each word is different, they all conform to the pattern of three uppercase letters; if some documents contain numbers like 60, 2, 5, although the values differ, they all belong to the category of consecutive numbers. In such cases, formulas can be used to match them uniformly, without needing to write each word into the replacement list individually.
Common applicable scenarios include:
- Batch replacing English abbreviations, department codes, and course codes in multiple Word, docx files.
- Batch processing numeric content such as numbers, years, and amounts in contracts, agreements, and bidding documents.
- Uniformly replacing placeholders, numbering rules, and fixed-format text in template documents.
- Cleaning up Word reports exported from systems to standardize keywords in different formats into a unified writing style.
- Replacing a category of text by rule in multiple docx files, avoiding manual modification file by file.
Compared to find and replace within a single Word document, the advantage of HeSoft Doc Batch Tool lies in its batch processing capability for files: first import multiple Word files, then set unified find and replace rules, and finally execute them all at once. For users who frequently handle large volumes of office documents, this type of batch processing method can significantly reduce repetitive work.
Effect Preview: Keywords to be Replaced Exist in Multiple docx Files Before Processing
From the file list before processing, it can be seen that the example folder contains six Word documents, from 1.docx to 6.docx. This scenario is very common: users often need to adjust content not just in one document, but across multiple files in a folder simultaneously.

After opening one of the Word documents, you can see that there are multiple places in the body text with patterned content. For example, BOT in the title, ELA in the body text, and the number 60, etc. The red arrows in the screenshot indicate typical content to be processed: they are not completely identical fixed words, but they can all be identified through rules.

If you only need to replace BOT, a simple find and replace operation will suffice; but if you want to replace all three uppercase letters with one value and all consecutive numbers with another value, you need to use "formula-based fuzzy text finding," which means using regular expression wildcards to match a category of content.
Post-Processing Effect: Three Uppercase Letters and Numbers Are Batch Replaced
After processing is complete, open the Word documents again, and you can see that content originally matching the rule for three uppercase letters has been replaced with A, and consecutive numbers have been replaced with B. For example, BOT in the title is replaced with A, English abbreviations like ELA in the body text are also replaced by the rule; numeric content is replaced with B. The yellow highlighting in the screenshot allows you to intuitively see the replacement results.

The value of this replacement method lies in: users do not need to list all possible keywords one by one; as long as these keywords conform to the same pattern, they can be batch matched with a single formula. This is very practical for tasks such as batch processing Word content, batch replacing docx keywords, and uniformly modifying document templates.
Operation Step 1: Enter the Word Tool and Select the Find and Replace Function
After opening HeSoft Doc Batch Tool , select "Word Tools" in the function category on the left. The interface shows multiple functions related to Word file processing, such as adding watermarks, modifying page layout, deleting white space, converting formats, etc. The function used in this article is the first one: "Find and Replace Keywords in Word."

The purpose of this function is to batch find and replace keywords in the content of Word files. After selecting this entry, the software enters a wizard-style workflow. For users unfamiliar with batch tools, the wizard workflow is relatively clear: first select files, then set processing options, then set the save location, and finally start processing.
The operational goal of this step is very clear: enter the correct Word batch find and replace module to ensure that the subsequently set rules will be applied to the content of the Word documents, not to file names, folder names, or other types of files.
Operation Step 2: Add the Word Files to be Batch Processed
After entering the "Find and Replace Keywords in Word" function, you first arrive at step 1 "Select records to be processed." In the upper right area of the interface, you can see buttons like "Add Files," "Import Files from Folder," "Clear," "More," etc. In the example, six docx files have been imported, and the list displays information such as serial number, name, path, extension, creation time, and modification time.

If the number of files to process is small, you can click "Add Files" to select them one by one; if the files are centrally located in the same folder, you can use "Import Files from Folder," which is more suitable for batch importing. After importing, check whether the files in the list are correct, for example, whether the names include 1.docx to 6.docx, whether the extension is docx, and whether the path is the target folder.
The expected result of this step is: all Word documents for which keywords need to be batch replaced appear in the list, and the summary record count at the bottom matches the actual number of files. After confirming there are no errors, click the "Next" button at the bottom to proceed to setting replacement rules.
Operation Step 3: Select Formula Fuzzy Finding and Fill in the Regular Expression
Step 2 is "Set processing options," which is also the core of this article. The "Find method" in the interface provides two options: "Find exact text" and "Use formula to find fuzzy text." Since this example aims to match a category of content, not a fixed word, select "Use formula to find fuzzy text."

In the "List of keywords to find," the example fills in two rules:
- [A-Z]{3}: Used to match three consecutive uppercase English letters, such as BOT, ELA, etc.
- \d+: Used to match one or more consecutive digits, such as 60, 2, 5, etc.
In the "List of keywords to replace with" on the right, the example correspondingly fills in:
- A: Corresponding to the first find rule, indicating that matched three uppercase letters will be replaced with A.
- B: Corresponding to the second find rule, indicating that matched consecutive numbers will be replaced with B.
Here, special attention must be paid to the correspondence between the left and right sides. The first find rule on the left corresponds to the first replacement content on the right, and the second line on the left corresponds to the second line on the right. Therefore, if you want to set up multiple sets of batch replacement rules, it is recommended to check line by line to avoid writing the replacement result on the wrong line.
Additionally, the interface has an additional option for "Ignore case of letters." This example matches uppercase letters [A-Z]. If you want to strictly match only uppercase, you do not need to check ignore case; if your business scenario requires handling both uppercase and lowercase, you can adjust it according to actual needs. After completing the settings, click "Next."
Operation Step 4: Set the Save Location and Start Batch Processing
After completing the replacement rule settings, the process will proceed to step 3 "Set save location," and then to step 4 "Start processing." Although the screenshot does not show the save location page, it can be seen from the top of the wizard that these two steps are part of the software process. It is recommended to select a new output directory in the save location step to avoid processed files directly overwriting the original documents. For important contracts, reports, papers, course materials, and other documents, keeping the originals is very necessary.
After confirming the save location, enter the start processing step and execute the task. The software will read the content of the Word documents one by one according to the previously imported file list, and batch replace keywords based on the set regular expression rules. After processing is complete, go to the output directory and open the files to check the results.
The expected result of this step is: the target content in multiple Word, docx files is uniformly replaced, without the user needing to open and operate files individually or repeatedly execute find and replace in each document.
Common Questions and Precautions
1. Why can regular expressions replace different keywords?
Because regular expressions match patterns, not a specific fixed text. For example, [A-Z]{3} matches "three consecutive uppercase letters," so BOT, ELA, etc., can all be identified; \d+ matches "consecutive digits," so different numerical values can be processed uniformly.
2. Can the replacement list have multiple lines?
Yes. From the screenshot, both the find list on the left and the replacement list on the right support multi-line input. When using, maintain the correspondence of line numbers: the find rule on which line corresponds to the replacement content on the same line.
3. What happens if the replacement content is left blank?
The interface prompts "Leaving blank means deletion." This means that if the replacement keyword is not filled in on the right side for a particular find rule line, the matched content might be deleted. Carefully check before formal processing to avoid accidentally deleting important content.
4. Is it recommended to directly overwrite the original Word files?
It is not recommended. Batch processing affects multiple files, and if the rules are set improperly, the scope of modification could be large. A safer practice is to output to a new folder, and replace the original files only after confirming there are no errors.
5. Can both doc and docx be processed?
The example in this article's screenshot uses docx files. For other Word formats, such as doc, it is recommended to rely on the actual import and processing results of the software. If the list can recognize and process them normally, then proceed with the batch replacement.
Summary
Using regular expression wildcard formulas to batch replace keywords in Word is suitable for processing a large number of office documents with similar content structures and clear replacement rules. Through HeSoft Doc Batch Tool , users can first import multiple docx files, then select "Use formula to find fuzzy text," enter rules like [A-Z]{3}, \d+, and set the corresponding replacement content, and finally complete the batch processing in one go.
Compared to opening Word files individually and manually finding and replacing, this method is more suitable for scenarios with many files, repetitive rules, and where manual operation is prone to errors. It is recommended to test the rules with a small number of files before formal processing, and after confirming the processing effect is correct, execute the batch replacement on the entire folder.