Micro Focus QTP (UFT) Forums
Regular Exp Issue - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Regular Expressions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Regular-Expressions)
+--- Thread: Regular Exp Issue (/Thread-Regular-Exp-Issue)



Regular Exp Issue - Jyobtech - 09-13-2012

Dear Experts.
Please help out ,
I would like to do Regular Exp for the below line in SAP ,

Code:
SAPGuiSession("Session").SAPGuiWindow("Document Flow").SAPGuiTree("TableTreeControl").SelectItem "GT-BP CRM Complaint 0065000430 / 1010;GT-Credit Memo Reque 0060000120 / 1010","GT-Credit Memo Reque 0060000120 / 1010"

But the numbers mentioned in above line
1.0065000430 / 1010
2.0060000120 / 1010
3.0060000120 / 1010

will change so I want to do it in Regular Expressions. Can you please help me to do Reg Exp.


RE: Regular Exp Issue - Ankesh - 09-13-2012

You can try the below code.

Code:
SAPGuiSession("Session").SAPGuiWindow("Document Flow").SAPGuiTree("TableTreeControl").SelectItem "RegExp:=GT-BP CRM Complaint .*;RegExp:=GT-Credit Memo Reque.*","RedExp:=GT-Credit Memo Reque.*"

OR

SAPGuiSession("Session").SAPGuiWindow("Document Flow").SAPGuiTree("TableTreeControl").SelectItem "RegExp:=GT-BP CRM Complaint .*;RegExp:=GT-Credit Memo Reque.*","#1"


Modify the code if required.

Regards,
Ankesh


RE: Regular Exp Issue - Jyobtech - 09-28-2012

Thanks Ankesh ,
It should work because the same logic appilied one of my senior in earlier project but I forgot this how to use regulaer exp here so I posted here ...after seen your code , I got it -Thanks