Regular Expression in VTAP

Regular expressions enable VTAP to verify the object property.  Regular Expressions increase the flexibility and adaptability of tests. 

Regular expressions can also be used in VTAP verification actions.

A regular expression is a string that provides a complex search phrase. It contains a set of special characters using which you can define the conditions of search. The special characters may be period (.), asterisk (*), caret (^), brackets ([ ]), parentheses (()), dollar sign ($), vertical line (|), plus sign (+), question mark (?) and backslash (\).

The table below helps you to define expressions for the PatternMatch operator to input values for the Verify Property action and set the search criteria.

Note: In the Enter Values dialog box,  select PatternMatch from the Operator listbox and enter the required expression in the Expected value Text box. For example, ^New.

Regular Expressions




Matches the beginning of the input



Matches the end of the input



Matches the preceding character zero or more times

Go*gle Search


Matches the preceding character one or more times

Go+gle Search


Matches the preceding character zero or one time

G?ogle Search


Matches any single character except a new line character



Matches either x or y. (Character|Character)



n is a nonnegative integer. Matches exactly n times.

Go[2]gle  (matches only two o's )


N is nonnegative integer. Matches at least n times.

Go[2,]gle   (matches at least two o's )


N is nonnegative integer. Matches at least n and at most m times.

Go[1.2]gle  (matches o's first two times)


A character set. Matches any one of the enclosed


Go[xyz]gle (matches x,y,z)


A negative character set. Matches any character

not enclosed.

Go[^p]gle (does not match p)


A range of characters. Matches any character in

the specified range.

Go[a-z]gle (within the range a - z )


A negative range characters. Matches any

character not in the specified range.

Go[^a-z]gle (not within the range a - z )


Matches a digit character. Equivalent to [0-9].

Testing/d1 (matches a digit 0 - 9)


Matches a non-digit character. Equivalent to [^0-9]. 

Testing/D (matches a non-digit 0 - 9)


Matches any white space

Google/sSearch (matches for white space)


Matches any word character including underscore. Equivalent to "[A-Z a-z 0-9_]".

Software/wTesting (matches for alphanumeric Charecters)