Finding and Replacing Text
The Find and Replace in Files window pane lets you perform more advanced searches than the integrated Find and Replace widgets. You should use this window pane if you need to search for text in more than one file.
[Menu Proxy — Headings — Online — Depth3 ]
How to Find and Replace Text
- Select Home > Find and Replace.
-
Use the options in the window pane as necessary.
- Find Enter the text you want to find. When you first open the window pane, this field might be automatically populated, based on the text selected in the document, or the text where the cursor is resting. You can also select text and press CTRL+SHIFT+F to populate the field. Another option is to simply type text or click the down arrow and select a recent search term.
- Replace with Type the text that will replace the found text. You can also click the down arrow and select a recent search term.
-
Find in Select one of the following:
-
(current document) Looks for the text in the active document
-
(all open documents) Looks for the text in all documents currently open in the interface
-
(review package) Looks for the text in files that are contained in the review package (not available for MCCO or MCDOC files)
-
- File types Select one of the following, depending on which kind of files you want to search. This option is disabled if you have selected to look in the current document only.
- All Files Looks in all file types
- Topics Looks for text only in topic files
- Snippets Looks for text only in snippet files
- CSS Stylesheets Looks for text only in stylesheet files
- Page Layouts Looks for text only in page layout files
- Options Use any of the following additional options:
- Match case Finds only occurrences of the text that match the case (e.g., uppercase, lowercase) of the text entered in the Find field
- Whole word Looks for whole words only (e.g., if you enter "stand" as the search term, it will find "stand," but not "standing")
- Find in source code Not available in Contributor
- Create backup (Replace All) Not available in Contributor
-
Search type Searches for regular text, but you can also use this field to search using wildcards or regular expressions.
- Show results in (Find All):
- Window 1 Displays the search results (list of files) in the Find Results 1 window pane when using the File All feature
- Window 2 Displays the search results (list of files) in the Find Results 2 window pane when using the File All feature
- Find Next Locates the next occurrence of the text
- Find Previous Locates the previous occurrence of the text
- Skip File Skips searching in the current file and moves on to the next one
-
Find All Finds and lists all occurrences of the text in the Find Results window pane at the bottom of the user interface
The label on this button changes to "Stop Find" while a search is being processed. This is one way to tell that a search is in progress. Another way is to watch the counter in the Find Results window pane. This shows how many occurrences of matching text have been found; if the number continues to go higher, the search is still in progress.
Note The Find All option will not work if your search includes multiple words next to each other and at least one of the words has a span tag (e.g., you are searching for "MadCap Software," but there are places in the document where the word "MadCap" is in bold and "Software" is not). However, the Find Next option will work in a situation like this.
The suggested workaround for the Find All option is to select the "Find in source code" option, use regular expressions, and enter something along the lines of \s(<.*?/?>) between the words to attempt to capture intervening tags. However, use caution when replacing source code in order to prevent corruption of your XML.
- Replace Replaces only the current instance of found text
-
Replace All Replaces all of the matching text in all files included in the search
If matches are found in files that are already open, Contributor replaces the text in those files and "dirties" them (i.e., an asterisk is shown in the tab, indicating the file has been changed and needs to be saved). Therefore, you can undo the changes if necessary in each of those files or save them. As for files that are not already open in the user interface, Contributor does not open them at all. Instead, it simply replaces all of the matching text it finds and automatically saves those files. Therefore, you cannot undo those changes because the files were never opened.
- [Progress Bar] Green bar at bottom of window pane shows progress of the search
What’s Noteworthy?
Note With the Free Review (Annotation Only) Workflow, you can find text, but you cannot replace it.
Note When reviewing MadCap Lingo review package (LIREV) files, you can find text, but you cannot replace it. You can replace text using the Quick Replace widget. See Using the Quick Find and Replace Widgets.