How to use regex in UFT object properties
Question ID: 109988

I’m pretty new to using regular expresions. Can someone please help implementating of regular expressions in object properties? We are using shared Object Repository in UFT 15.0.2.

I need to use regex in a devname property that can be different based on the loaded customer information.

The originally recorded devname = “CustomerLayout;Customer1Layout;1234”

I need to use this as “CustomerLayout;Customer1Layout;####” (with any 4 digit number at the end).

Marked as spam
Posted by (Questions: 386, Answers: 64)
Asked on January 19, 2021 3:48 pm
Answers (1)
Private answer

In the object repository, go to the object and click in the devname property. Click the "Configure the value" button on the right side of the field. Click the "Regular expression" box and enter the value in the repository parameter Constant field as


This makes the property value as CustomerLayout;Customer1Layout; with any 4 digit number.

You can use the Regular Expression Evaluator to ensure you have the expression set properly. You can find guides to regular expressions doing a web search.

Marked as spam
Posted by (Questions: 16, Answers: 807)
Answered on January 19, 2021 3:50 pm
That worked perfectly. Thanks for the help!
( at January 19, 2021 3:51 pm)

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

Scroll to Top