Provides simple regular expression support. It enable Quick Test to identify objects and text strings with varying values. Regular expressions are used when the objects value is dynamically changed.
Properties of Regular Expressions –
-
Global Property – Sets or returns a Boolean value that indicates if a pattern should match all occurrences in an entire search string or just the first one.
-
IgnoreCase Property – Sets or returns a Boolean value that indicates if a pattern search is case-sensitive or not.
-
Pattern Property – Sets or returns the regular expression pattern being searched for.
Methods of Regular Expressions –
-
Execute Method – Executes a regular expression search against a specified string.
-
Replace Method – Replaces text found in a regular expression search.
-
Test Method – Executes a regular expression search against a specified string and returns a Boolean value that indicates if a pattern match was found.
Additional Reading
All You Need to Know About Regular Expressions in QTP