Use a regular expression in QuickTest to search for a specific string format within the aut. QuickTest recognizes all those values in the AUT that meet the search criteria specified in the regular expression.

A regular expression is a string of special characters that defines the conditions of a search. For example, in the Flight Reservation Application, a different order number is generated every time you run a Test. To accommodate these changing order numbers,you can use Checkpoints with regular expressions so that QuickTest can recognize the
generated order number.

To use a regular expression in a CHECKPOINT:

  1. In the CHECKPOINT PROPERTIES dialog box, ensure that the CONSTANT option is selected and click the CONSTANT VALUE Options button. The CONSTANT VALUE OPTIONS dialog box appears.
  2. Check the REGULAR EXPRESSION check box.
    Note: QuickTest provides an option to treat the characters that you have entered in the VALUE field as literal characters. Click NO if you do not want to treat characters as literal characters.
  3. In the VALUE field, type the regular expression. For example, Figure shows the [0-9]+ expression in the VALUE field.
  4. Click OK.

Some Regular Expressions: