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 –QTP-regular-expressions

  1. 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.
  2. IgnoreCase Property – Sets or returns a Boolean value that indicates if a pattern search is case-sensitive or not.
  3. Pattern Property – Sets or returns the regular expression pattern being searched for.

Methods of Regular Expressions –

  1. Execute Method – Executes a regular expression search against a specified string.
  2. Replace Method – Replaces text found in a regular expression search.
  3. 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

If you want to keep track of further articles on UFT (QTP). I recommend you to subscribe by Email and have new UFT articles sent directly to your inbox.

Subscribe to get free updates on UFT!

LearnQTP is the most popular site on UFT (formerly QTP).

Enter your first name and email address below to instantly subscribe and download an eBook on Optimizing UFT Scripts. In future, we will make sure you get new tips & tricks on UFT delivered direct to your email box.

Please check your email and confirm free subscription!