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

hi is there any chance to change encoding the password

3 Answers  


How to make arguments optional in a function?

1 Answers   Crea,


I have a drop down box to show selected number of records in result page.It contains 4 items like 10, 25,50 and 100. when i was recordes script for seelcting each item and checking selecting number of records in the result page( it is in the same page in the table format)it is generating a new page with same controls( objects) in the OR. how to avaid these in OR? is it possible to write DP for only these lines?, remaining(remaingin lines of code) objects i want use from OR only. One more problemis if change ( add /remove properties of an OBJECT in OR , my ( recorded )application is not running.

5 Answers   Virtusa,


What is difference between the For..Next and While..Wend statements?

2 Answers  


In automation testing Can we retest virtual object in the application after getting new version from the developers, is there any property will change for that object or it won't.?

1 Answers   Siemens,






wht is the difference betn check point and output value?

5 Answers   BirlaSoft,


how to merge object repositories?

4 Answers  


What is Cross browser testing? Does UFT support it?

0 Answers  


hi everyone today is the first time i saw this website,and hi iam siraj,iam very impressed by seeing evryones response towards questions,iam a newcomer and i have got tryining in testing can anyone please send me some projects relaited to testing.i know it is very confidential but still if u send it will a great help. my mail id venku_krs@yahoo.co.in

1 Answers  


Hi i want to export the data from applicatioon to excel and later i want to import and use it for my scripts hoe can i do this?

1 Answers  


HOW DO U CALL A ACTION IN QTP?

2 Answers   BirlaSoft,


how to identify an object which is not in the object repository identification can be done using descriptive programming.

2 Answers  


Categories