write is the code for regular expression in QTP

Answers were Sorted based on User's Feedback



write is the code for regular expression in QTP..

Answer / raj

'Prepare a regular expression object
Set myRegExp = New RegExp
myRegExp.IgnoreCase = True
myRegExp.Global = True
myRegExp.Pattern = "regex"

Pop up a message box for each match
Set myMatches = myRegExp.Execute(subjectString)
For Each myMatch in myMatches
msgbox myMatch.Value, 0, "Found Match"
Next

Is This Answer Correct ?    6 Yes 1 No

write is the code for regular expression in QTP..

Answer / pravat

RegExp:=name.*

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More QTP Interview Questions

How to find if given number is prime or not

1 Answers  


diff between winrunner and qtp

1 Answers   Wipro,


How should i get name of the screen? Ex:There is a "submit" button.If i clicked on the submit button it opens a screen. I want that screen name.How can i get that screen name I dont have any property regarding that screen. If suppose we cliked on the screen , Then QTP captures the screen properties then i can get the screen name by using GETROPROPERTY But i want the screen name without clicking the screen. ("I am using the "settoproperty" for Second screen by using fist screen properties") Please tell me anyone

3 Answers   Livetek,


Hi,EXCEL SHEET AND DATA TABLE . BOTH ARE SAME OR NOT?

3 Answers  


i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?

0 Answers  






I have a WebEdit Object.It is added in object repository.It has two properties Name and Index.In the next release the Name Property is same but the index property is changed.when i run the script will the script Pass or Fail

9 Answers   ADP,


Wht is Smart Identification Mechanisam in QTP..Actually when do we this Technology means during Recording or running ....how is technology works. Anybody can expalin this .....Thanks in advacne

4 Answers   Siemens,


What are the advantages of QTP over WinRunner?

5 Answers   CTS,


I added 5 edit box objects in OR.i run the script and the first edit box successfully executed.But on next day when i executed same script for second edit box,it gives an error "object not Found". But when i used Highlight in app. object already in OR.So how i will handel this type of error. Hi please inform me the write answer.Its urgent.

1 Answers   TCS,


HI, Based On The Information Below Write A Data Driven test Script Edit Box 1 Should take Value From Num1 Column Edit Box 2 Should take Value From Num2 Column Click On Add Button, Get The Value Of Exp res Column, Get Value From Actual Result Edit Box , Compare Two Values, Write Pass / Fail Value Into Result Column Thanks In Advance... Kavitha Input.Xls Num1 Num2 Exp res Act res Result 10 30 40 40 Pass 50 40 90 90.5 - - - - - - - - - - - - - - - -

5 Answers   UHG,


In a QTP project lets say there are 100+ function library and incorrectly we have duplicate some function in multiple libraries. How to find those duplicate functions and remove them?

1 Answers  


Where we use data driver in qtp?

0 Answers  


Categories