Regular Expression Evaluator

Relevant for: GUI tests, scripted GUI components, and API testing

This dialog box enables you to create and test a regular expression to determine whether it suits your needs. You can enter a regular expression and sample text to test. When you click Highlight, UFT One searches the sample text for matches, highlights these matches, and displays the number of matches.

To access
  1. Do one of the following:

    • Ensure that a test, action, or component is in focus in the document pane.

    • In the Solution Explorer, select a test or component node.

  2. Use one of the following:

    • Select the Tools > Regular Expression Evaluator menu command.

    • Click the Smart Regular Expression button to the right of a value box in any dialog box (except the Find and Replace dialog boxes) in which the Regular Expression check box is selected. Select the Open Regular Expression Evaluator list item.

Important information

The list of selectable regular expression characters available from this dialog box is also available from other UFT One dialog boxes that contain a selected Regular Expression check box and the Smart Regular Expression button .

The Regular Expression Evaluator is not supported for regular expressions in the Find and Replace dialog boxes.

See also

Conceptual overview: Regular expression characters and usage options

Additional related topics: Smart Regular Expression List

User interface elements are described below:

UI Elements

Description

Smart Regular Expression. Click to display a list of regular expression characters that you can select. For details on each of the regular expression characters, see Smart Regular Expression List.

Regular Expression

The regular expression to test. Enter the regular expression in this box.

Tip: Click the right arrow to display a list of regular expression characters that you can insert.

Highlight

Searches for the regular expression in the Sample text area and highlights all matches.

Note: Before you click Highlight, make sure that the text to search is displayed in the Sample text area.

Sample text

The text to use when testing the regular expression.

Note: Text may already be displayed in the Sample text area when the dialog box opens, depending on the steps you performed to open this dialog box.

The Sample text area is editable. You can insert any text to test your regular expression.

Number of matches

The number of matches for the regular expression within the sample text. These matches are highlighted in the Sample text area.