Replace Dialog Box

Relevant for: GUI actions, scripted GUI components, function libraries, and user code files

This dialog box enables you to search for strings in files displayed in the Editor or located in a specific folder, and replace them with a different string.

You can either find and replace literal text or use regular expressions. You can also use other options to further fine-tune your find and replace process.

To access
  1. Create or open the document in which you want to search, or, to search in multiple files, open any document.

  2. Select Search > Replace or press CTRL+H.

Important information
  • You cannot use the Replace dialog box to search in the Keyword View, the canvas, or application areas.

  • The search is limited to the text in the file at the time that the Replace dialog box was opened. Any changes made after opening the Replace dialog box are not included the search.

See also

Searching and replacing

User interface elements are described below:

UI Elements

Description

Find text

The text string you want to locate. For details on searching with a regular expression, see the Expression Builder button description.

Recent searches and replacements. Click to select a recently used string. The list includes the last ten search strings.

Expression Builder. Click to select a predefined regular expression and insert it into your search string at the cursor location.

When you click this button, the Regular expression checkbox is automatically selected.

Regular Expression

Treats the specified text string as a regular expression. This option is automatically selected when you select a regular expression from the list.

Replace with

The text string you want to use as the replacement string. The text is replaced using the same casing as defined in the replacement string.

Look in

The files or folder you want to search.

Select one of the following from the drop-down list:

  • Current Selection. Searches within the currently highlighted text. You must highlight a specific area in the current file before selecting this option.

  • Current Document. Searches within the document currently open in the Editor. This is the default option.

  • Current Test. Searches within the currently open test.

  • Entire Solution. Searches within the entire solution for the file currently open in the Editor.

  • <Files...>. Enables you to browse to a select a specific folder in the file system.

    Note: (for ALM users) You cannot browse to an ALM path. If you want to search in a document stored in ALM, you must open the document first.

The drop-down list also displays the last ten folders you selected, with the most recent folder listed first. Select one to search in the same folder again.

For details, see Searching and replacing.

Match case

Distinguishes between upper-case and lower-case characters in the search, and searches only for occurrences with exact matches to the casing in the search string.

Match whole word

Searches only for occurrences that are whole words and not part of longer words.

Search up

Searches from the cursor location towards the top of the file, and then wraps around to the current cursor location from the bottom of the file.

Include sub-folders

Searches and replaces through any sub-folders found in the selected folder.

Note: This option is available only when you select a specific folder from the Look in drop-down list.

Find Next

Searches for the next occurrence of the defined search criteria.

Replace

Replaces the string defined in the Find text field with the string defined in the Replace with field.

Replace All

Replaces all occurrences of the string defined in the Find text field with the string defined in the Replace with field, throughout the location defined in the Look in drop-down list. All strings are found and replaced in the same action.