Micro Focus QTP (UFT) Forums

Full Version: Regular Expression
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

can anyone please tell me the regular expression for the code below

Code:
DelphiWindow("Shell").DelphiTreeView("BISTree").Select "BIS Connections;test;new [38I0]", micRightBtn

the value [38I0] is dynamic, i want a regular expression for the same.

Note: This is not there in the Object Repository

I know that it could be done using descriptive programming. But, since i am new to QTP, i dont know how to proceed.

appreciate your help.

thanks

sudha
You can parametrize this value. If the value is getting generated at run time. you can always add it dynamically. For ex:

Code:
var= [3810]

"BIS Connections;test;new " & var
You can use

Code:
DelphiWindow("Shell").DelphiTreeView("BISTree").Select "BIS Connections;test;new [\d*]", micRightBtn

If you have only one oject of that type there
Hi you can use below one

^\d{4}$

This will check for only 4 digits.

Thanks
VENKATA