Regular expressions

If you use text matching on pages with various labels, you might be unable to locate a label by using a simple text string. In this case, you can use a regular expression.

For example, one car rental company might use the label Date, another might use the label Pickup date, while another might use Pickup Date. In this example, you can use the Locate library regular expression actions, including the following actions.

Library Action Description
Locate RegExFind Same as WordFind, except that it supports regular expressions.
Locate FindLastRegEx Same as FindLastWord, except that it supports regular expressions.
One way you can search for any of the three pickup date labels in the previous example is by using a single regular expression.
RegExFind( "(Date)|(Pickup [Dd]ate) ")
The Locate library regular expression actions use the VBScript regular expression rules. Some of this usage is described in detail in the following MSDN article
http://msdn.microsoft.com/en-us/library/1400241x%28v=vs.85%29.aspx