Multiple Find & Replace – Documentation

Multiple Find and Replace tool icon Multiple Find & Replace tool makes it extremely easy to find and replace text in Word documents using lists of search expressions. With its help, you will be able to find multiple words or phrases using standard text search or regular expressions, decide which occurrences need changing, and then replace them and/or format them as required.

Detailed information about Multiple Find & Replace tool

How Multiple Find & Replace tool can help you in your work

  • Review documents for potential mistakes or style guide requirements: create a search expression list on the basis of a list of common mistakes or your customer's style guide requirements, and use this list for checking documents using Find All button. You will be presented with a list of all occurrences and it will take you only a couple of minutes to find all the real issues before making replacements. As you review the potential issues, you can update the list to make it more effective for future documents.
  • Make last-minute changes to Word documents already submitted to your customer: if your customer requests certain changes to be made in documents you already translated, you can quickly create an ad-hoc search expression list, then make replacements in each document using this list. This will save you a lot of time!
  • Change number, currency or date formats in a document: Multiple Find & Replace tool supports .NET regular expressions which allow you to make very complex changes in your documents. For example, you can change U.S. date format ‘03/15/2019’ to UK date format ‘15/03/2019’, or change currency format like ‘100 €’ to ‘€100’.
  • Format text the way you want: you can apply specific formatting to selected occurrences of search expressions, or replace and format the text at the same time. For example, in English documents you can replace all phrases inside quotation marks with italicized text,
    e.g. “The New York Times” => The New York Times.
  • Color-highlight potential issues for manual review: if it is more convenient for you to perform replacements manually, you can apply color highlighting to all occurrences of your search expressions and then review them later.
  • New in version 1.2: you can process multiple Word documents with Multiple Find & Replace tool by using Document Processing Tool. Click here for more information about this tool.

Download TransTools+ brochure to see real-life examples of how Multiple Find & Replace tool and other TransTools+ features can help you increase quality and productivity.

Where to find the tool

To run Multiple Find & Replace tool, click Multiple Find & Replace button on TransTools+ ribbon:

Multiple Find and Replace button on TransTools+ ribbon

This will open Multiple Find & Replace pane to the right of the current document.

Using Multiple Find & Replace tool

Working with search expression lists

Multiple Find & Replace tool searches the current document for search expressions defined in the current search expression list.

Search expression list

To create a new list, make sure that [New List] is selected in the dropdown list, then add entries using Add button or import entries from another list, external file or clipboard by using Import button. Then save the changes using Save button or export the search entries by clicking Export button. An alternative method is to click Create New List button located to the right of the dropdown list, assign a name to the new list, and then add entries to it.

To use search entries from an existing list, select the list from the dropdown list, or click the right-most button (Open) to open a list stored in an external file. If you need to use several search entries only, simply remove the unneeded entries using Remove button. The changes will not be recorded in the appropriate list file unless you click Save button.

Editing the search entries: Click Add button to add a new entry to the current list. Edit button allows you to edit the selected entry. Remove button removes entries which were selected in the list. Clear button removes all entries currently displayed in the list. You need to click Save button in order to record these changes in the file where the appropriate list is stored.
Note:
you cannot edit entries in internal lists whose names start with ‘(TransTools)’ – they are provided as part of TransTools+ distribution and cannot be modified. However, you can export them to another list and then make all the necessary changes there.

In order to copy search entries from one list to another or from / to external applications like Microsoft Excel, you can use Import and Export buttons:

  • Import button loads search entries from a named list file, external file or clipboard and places them at the end of the list:
    Load list dialogue
    If you choose Import from clipboard option, you need to make sure that the text located on the clipboard is in the correct format (you can save an existing list to clipboard to see the expected format).
  • Export button copies the current search entries to a named list file, external file or clipboard:
    Save list dialogue
    If you export to an existing list or file, you can choose whether to append the contents of the current list to the end or to overwrite the existing list/file.

    Trick: If you export to clipboard, you can use Excel or a text editor for quick entry creation or editing. For example, if you want to create a dozen entries which share certain parameters, such as Search Options, Find Formatting or Replacement Formatting, you can create one entry using the Item Editor, export the list to clipboard, paste the clipboard to a text editor several times, then change the Find What text and Replacement Text in each line as appropriate, copy the entire contents of the text editor to clipboard, then import from clipboard into the current Multiple Find & Replace list.

To delete or rename an existing list, click Manage Lists button (Manage Lists) which appears next to the dropdown list. Internal TransTools+ lists cannot be deleted or renamed.

Creating and editing search expressions

To add a new search expression to the current list, click Add button. To edit an existing search expression, select a search expression and click Edit button, double-click a search expression, or press Enter key.

There are two types of search expressions:

Text search expressions

Search expressions of this type use standard Microsoft Word’s Find & Replace syntax to find and replace text. To use standard text search, select Text option button in the Item Editor.

Standard text search and replace

In the Find What field, enter the text search string. You can insert special symbols such as ^l for manual line break by clicking Insert... button or typing the appropriate code (these codes are the same as in Microsoft Word, but it is recommended to insert them this way). To make the expression easier to read, you can change the font size by clicking the buttons to the right of the Find What field.

If the text you need to find has specific font formatting, e.g. bold, italic, underlined, etc., you can specify this formatting by checking Find text with specific formatting checkbox:

Find specific formatting

To find text with specific formatting, click Change button, then select a formatting parameter and change it to a specific value. The following font formatting is supported: Bold, Italic, Font Size, Font Color, Underline Style, Superscript, Subscript, Strikethrough, Double Strikethrough, Small Caps, All Caps, and Hidden. If a parameter should not be considered, its value must be “Any” (for dropdown lists) or a checkbox with a square inside it (Undefined checkbox value).

Check Match Case checkbox to perform case-sensitive text search.

Check Find Whole Words Only checkbox if the text must match full words, i.e. without spanning only part of a word. For example, this is useful for finding the singular form of a noun: if you enter “spider” and check Find Whole Words Only checkbox, the tool will find “spider”, but not “spiders”.

Check Use Wildcards checkbox if you want to use Word’s special wildcard symbols. When this checkbox is checked, Insert... button allows you to insert special wildcard codes.

In Replace With field, enter the text which will be used for replacement. Click Insert... button to insert special Word codes like ^p for Paragraph Mark.

To apply specific font formatting during replacement, check Apply specific formatting upon replacement checkbox:

Replacement formatting editor

To apply specific formatting during replacement, click Change button, then select a formatting parameter and change it to a specific value. The following font formatting is supported: Bold, Italic, Font Size, Font Color, Underline Style, Superscript, Subscript, Strikethrough, Double Strikethrough, Small Caps, All Caps, and Hidden. If a formatting parameter should not be applied, its value must be “Do not change” (for dropdown lists) or a checkbox with a square inside it (Undefined checkbox value).

To apply specific highlight color during replacement, check Apply custom highlight color checkbox and then select the highlight color from the drop-down list:

Highlight color selection

In the Description field, you can add a short note to make it easier to understand what kind of text is found/replaced by the expression. This information will also be displayed in the Search Results list after you click Find All button.

Important notes about using Find What and Replace With fields:

  1. You can find any text that has specific formatting by leaving Find What field empty and defining the formatting under Find text with specific formatting checkbox.
  2. To apply specific text formatting or highlight color to text, leave Replace With field empty and specify the replacement formatting and/or highlight color under the appropriate checkboxes.
  3. If you want to replace text with a blank, leave Replace With field empty and do not specify replacement formatting and highlight color.

Regular expressions (.NET)

Regular expression items describe the parameters for finding text using Microsoft .NET regular expression mechanism. NOTE: The search is conducted in each individual paragraph, so this type of search can only be used when the match (i.e. text described by the regular expression) does not span several paragraphs, i.e. it is located inside a single paragraph.

Regular expression search and replace

To use regular expression search, select Regular Expression option button in the Item Editor.

In the Find What field, enter the search string. You can insert regular expression operators and constructs by clicking Insert... button. To make the expression easier to read, you can change the font size by clicking the buttons to the right of the Find What field.

Uncheck Match Case checkbox if the regular expression must be case-insensitive (regular expressions are case-sensitive by default).

If your regular expression contains a capturing group, you can match the text found by this capturing group instead of the text found by the entire regular expression. To do this, check “Find capturing group...” checkbox and then select the sequential number of the group from the dropdown list. If you use this option and refer to capturing groups in the Replace With field with $1 syntax, you should note that the numbering of capturing groups remains the same.

In the Replace With field, you can insert special constructs that allow you to build the replacement text from parts matched by the Find What text. For example, $1 inserts the text matched by the first capturing group inside the Find What field. Click Insert... button to insert them.

All other parameters are the same as for standard text search expressions (see above).

Viewing contents of search expression lists

The contents of a search expression list are displayed as follows:

Search expression list contents

  1. Find What column: contains the type of search expression (Text search for standard text search and Regex search for .NET regular expression search) and the text that needs to be found, or, if only formatting needs to be found, “(Find Formatting: description of formatting)”.
  2. Replace With column: contains the text which must replace the existing text. If this text is empty and the user specified replacement formatting or highlight color (which means that the text should not be replaced and only formatting must be changed), then you will see “(Replacement Formatting: description of formatting)” or “(Highlight Color: color name)”.
  3. Search and replacement options column: contains special icons that indicate non-default search and replacement options:
    • Search options – indicates that non-default search options are specified for this search expression. For standard text search, this is Match Case=Yes, Use Wildcards=Yes, or Match Whole Words=Yes. For .NET regular expression search, this is Match Case=No or Find Capturing Group Instead of the Full Regular Expression Match.
    • Find Formatting – indicates that the text must have specific font formatting.
    • Replace Formatting – indicates that special font formatting should be applied to the text during replacement.
    • Highlight Color – indicates that the text must be highlighted with a specific highlight color.

    You can hover the mouse over this column to see a description of the current search and replacement options.
  4. Description column: description of the search expression which helps you understand what the search expression does.

If you see ellipsis (...) at the end of cell text, you can hover the mouse over the cell to see the entire contents of the cell.

Finding and replacing / formatting text in the current document

There are several ways to use your search expression lists:

  1. Confirm each replacement operation by using Find and Replace buttons. When you click Find button, the tool finds the earliest occurrence of any search expression defined in your list, and selects it. You can change it manually or click Replace button to perform replacement. If your list is big, this approach may be a bit slow.
  2. Perform automatic replacement throughout the document or selection. For automatic replacement, click Replace All button.
  3. Display all occurrences of search expressions in a special list and then replace or format all or specific occurrences. To do this, click Find All button. All occurrences of your search expressions will be displayed under Search Results tab which will appear when the search is complete. You can then review each occurrence in document context and see how it will appear after replacement using a special preview window. If necessary, you can modify replacement text for individual occurrences. Then, make sure that the occurrences which need to be replaced or formatted are ticked with a checkbox, and click Replace Selected to replace ticked occurrences or Format Selected to format them without replacing the text.

1. Confirm each replacement with Find and Replace buttons

Using Find and Replace buttons, you can find each occurrence of the search expressions in your list, and replace them one by one.

Find and Replace buttons

The search begins from the current editing location (cursor) and continues to the end of the document, wrapping to the start of the document at the end. If you choose Selection at the top of the tool pane and click Find, the operation will take place within the current selection until the selection changes.

During replacement, you can apply font formatting and highlight color to replacements. This is done as follows:

  • To apply formatting and highlight color specified in the settings of each search expression, make sure that “Use individual settings of each search expression” is selected in the appropriate dropdown list (see screenshot above) and the appropriate checkboxes for highlight color and formatting are ticked. If none of the search expressions contains specific settings for highlight color / replacement formatting, then “Use individual settings of each search expression” will not be displayed in the dropdown list.

    Individual replacement formatting and color settings
  • To apply custom formatting and highlight color during replacement, select a specific highlight color and/or choose “Apply custom formatting”:

    Custom replacement formatting and color

    If you decide to change custom replacement formatting, click Change... button. The following dialogue will be displayed:
    Custom replacement formatting editor
    Specify the formatting that you want to apply to text (in addition to the formatting that it already has) and click OK.

Note: if the document contains several overlapping occurrences of your search expressions, the earliest occurrence will be found even if it is shorter than other occurrences. In contrast, Replace All and Find All buttons find the longest occurrence among two occurrences which begin in the same place inside the document.

2. Perform automatic replacement throughout the document or selection

For automatic replacement, click Replace All button.

You can perform replacements within the whole document or the current selection. You can change these options at the top of the tool pane:

Scope

If you select Entire Document option, you can perform the operation within specific areas of the document:

Custom scope

During replacement, you can apply font formatting and highlight color to replacements – see the previous section for more information.

3. Display all occurrences of search expressions in a special list and then replace or format all or specific occurrences

The best way to find and replace or format text in a document is by finding all occurrences of your search expressions and then decide what to do with them depending on context. To do this, click Find All button:

Find All button

All occurrences of the search expressions displayed in the list will be found within the current scope (see previous section) and displayed inside a separate list under Search Results tab:

Search results

The Search Results list contains the following columns:

  1. Process? – whether this occurrence must be processed (i.e. replaced or formatted depending on the button you click). By default, all occurrences will be ticked initially, and you will have to untick the occurrences that need to be skipped. To untick / tick all or selected items, right-click the list and choose the appropriate action:
    Search results context menu
  2. Preview / More information – if you hover the mouse over the eye icon in this column, you can see how the text will be replaced (including its future formatting, if appropriate), which options were used to find this occurrence, and you can get some additional information:
    Preview and more information window
  3. Found Text – text that was found in the document.
  4. Replacement Text – text which will be used for replacement. If you use custom codes like ^p or ^l, these codes will be displayed in this column instead of the actual text that will be used.
  5. Description – this column contains the description of the search expression which was used to find this occurrence. For complex search expressions, a well-crafted description will help you understand what the issues is, so you can make a decision what to do about the occurrence.

If you see ellipsis (...) at the end of cell text, you can hover the mouse over the cell to see the entire contents of the cell.

If you want to see a specific occurrence in document context, select it and you will be taken to its location within the document. If necessary, you can change it manually right within the document. However, in this case it will not be possible to change it using Multiple Find & Replace tool, and the following warning will be displayed in the list when you re-select this occurrence in the list:
Range was changed

If necessary, you can change the replacement text which should be used to replace a specific occurrence. To do this, select the appropriate occurrence, right-click the mouse and choose Change replacement text... You will see the following dialogue:

Change replacement text

You can insert special codes using Insert... button.
Note: at this time, it is not possible to specify blank text for replacement using this command.
If you change the original replacement text, you will see Original Replacement Text field displayed below, and you can restore it by clicking Use It button. Click OK to confirm your changes.

After you review all the occurrences and untick the ones you do not want to change, you have two options:

  1. Replace selected (ticked) occurrences – click Replace Selected button to replace the text and change its formatting in accordance with the options.
  2. Apply font formatting and/or highlight color to selected (ticked) occurrences – click Format Selected button to apply font formatting and/or highlight color to selected occurrences in accordance with the options.

Font formatting and highlight color is applied as follows:

  • To apply formatting and highlight color specified in the settings of each search expression, make sure that “Use individual settings of each search expression” is selected in the appropriate dropdown list (see screenshot below) and the appropriate checkboxes for highlight color and formatting are ticked. If none of the search expressions that were found contain specific settings for highlight color / replacement formatting, then “Use individual settings of each search expression” will not be displayed in the dropdown list.

    Individual replacement formatting and color settings
  • To apply custom formatting and highlight color during replacement, select a specific highlight color and/or choose “Apply custom formatting”:

    Custom replacement formatting and color

    If you decide to change custom replacement formatting, click Change... button. The following dialogue will be displayed:
    Custom replacement formatting editor
    Specify the formatting that you want to apply to text (in addition to the formatting that it already has) and click OK.

Note: if you uncheck the highlighting and/or formatting checkboxes, be careful with occurrences which need to be formatted only, i.e. their replacement text is empty. When both formatting and highlight color are empty, such occurrences will be replaced with empty text, i.e. they will be deleted. Always pay attention to the text shown in the Replacement Text column as you use these settings.

After you click Replace All, Replace Selected or Format Selected buttons and the document is updated, you will see a summary of the changes made:

Report after replacement or formatting operation

Predefined lists

Multiple Search and Replace tool is provided with several pre-defined lists of search expressions which you can use to prepare documents for translation. The following lists are provided:

  • DTP after OCR – this list contains a number of useful search expressions for those who work with documents produced by conversion from PDF or image files. It allows to do the following: color-highlight digit and letter numbering used instead of automatic list numbering (in order to apply automatic list numbering to them), remove tabs at the beginning and end of paragraphs, remove optional hyphens, remove spaces before final punctuation (e.g. “What?”) and after initial punctuation (e.g. “(text”), replace small 1-point text with regular-size text, replace tabs between letters/digits with a space, etc.

Extra search and replace options

Multiple Search and Replace tool provides a number of options that affect its behaviour:

Accessing extra options

Multiple Find & Replace options dialogue

  • Disable automatic replacement of "straight quotes" with “smart quotes” during replacement (applies to text search expressions only) – when this option is activated, Multiple Find & Replace does not change straight double quotes (") to smart quotes (“”, «», etc. depending on language) automatically when a text search expression is being processed. If you deactivate this option, straight quotes will be changed to smart quotes only if “Straight quotes with smart quotes” option is activated in Word’s AutoCorrect options. This option is activated by default.
  • Minimize the amount of text being replaced (applies to regular expressions) – when this option is activated, Multiple Find & Replace will change as little text as possible while making replacements as it processes regular expressions. This means that, if you replace “double sided” with “double-sided”, the tool will only change the space to a dash: double-sided. If you prefer to use Track Changes mode to review replacements, it will be harder for you to see what was changed, so you can deactivate this option in order to improve your experience. This option is activated by default.

Quality assurance (QA) tools

TransTools+

  • Spacing, Punctuation and Symbol Correction Tool – Create great-looking documents by removing excessive spaces, inserting missing spaces, using non-breaking spaces to keep text on the same line for readability, and using typographically correct symbols.
  • Highlighting Tool – simplify editing work: apply color highlighting, clear color highlighting, or find color highlighting

TransTools:

  • Multiple Replace – replace several words or phrases simultaneously across a document or selection
  • Correctomatic – correct words and phrases according to multiple correction lists
  • Find Multiple Text – find words and phrases defined in your search-replace list for manual correction

Batch tools

TransTools+

  • Document Processing Tool – perform various actions on multiple Word documents (DOCX, DOC, RTF format), using one or several different TransTools+ commands one after the other.