Regular Expressions


Regular expressions are strings containing special Meta characters used to match patterns inside the strings. Text editors use this feature for doing color syntax highlighting and other operations. 
Whenever the object properties are changing during run time then we are applying Regular expressions.

When to use SetToProperty method and Regular Expression?

1) Whenever we are using OR 
2) Whenever we are using DP programming then we have to use only RE
3) Whenever there is fixed change on properties for an object and using OR then we can use SetToProperty method 
4) Whenever there is no fixed change on properties for an object and with or without using OR then we can use RE

Applying RE through OR:

Open OR - select required object -In Test Object details area select required property and click on configure the value button - Enter RE string pattern - Check Regular Expression check box - click on OK button

Applying RE through DP:
Set objDialog=Description.Create
objDialog(“text”).Value=”Fax Order No. *.*”
objDialog(“text”).RegularExpression=True
Msgbox Window(“Flight Reservation”).Dialog(objDialog).Exist

Contributed by: Vamshi Gowtham
m.vamsigowtham@gmail.com