Highlighted
Steve Langille Absent Member.
Absent Member.
302 views

Working with Regular Expressions

Jump to solution
I need some help creating a Regular Expression and yes I have read about it in the QTP help file.

In one environment one of my objects shows up with a "title" of:

Oracle Applications - MHE UAT1 : User Acceptance Testing - Cloned from PROD on 23-Aug-08

In another environment that same object's "title" is:

Oracle Applications - MHE QUAL : Quality Assurance - Cloned from PROD on 26-Aug-08

Since the same script needs to be ran in both environments my only idea is to set the regular expression in my OR.

So far I have tried unsuccessfully:

Oracle Applications*

^Oracle Applications

Oracle Applications.

\w*

Can someone tell me how to make this work properly?

Thanks much!!
Steve Langille
Tags (1)
0 Likes
1 Solution

Accepted Solutions
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: Working with Regular Expressions

Jump to solution
The easiest way, if you don't have to validate the rest of the title:

Oracle Applications.*
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
3 Replies
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: Working with Regular Expressions

Jump to solution
The easiest way, if you don't have to validate the rest of the title:

Oracle Applications.*
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
Steve Langille Absent Member.
Absent Member.

Re: Working with Regular Expressions

Jump to solution
Jan,

How weird, I found that answer on the web at the SQAForums about 5 mins before you posted it here and it does work.

Thanks!
Steve
0 Likes
Paul Greij Absent Member.
Absent Member.

Re: Working with Regular Expressions

Jump to solution
Sometimes I have found it necessary to also account for some "hidden" characters (usually when an icon is present at the left of the title) by also placing a ".*" at the beginning - if that is not broad an expression (you could try to figure out how many chars there are and put appropriate amount of "."s before the static portion of the title).
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.