write is the code for regular expression in QTP

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I am a newbie to QTP / Automation testing. I want to develop a script that creates a data file automatically with proper headings using VBScript in QTP.

1812


How to find the difference between 2 dates in qtp?

833


How to customize checkpoints with parameters?

3251


Without using gui map editor we can recognize the application in winrunner ?

840


What is the use of running the scripts in Hidden-mode in UFT?

958


What is the XML file architecture ?

1783


How can you exit from an action?

817


What is a data driven test in qtp?

802


What is clean sweep?

1617


Hi , I am facing issue QTP 10.0 with oracle ERP 11i .When QTP opens,click sub links on ERP ,FORM is not opening getting unexpected Internet explorer error message with send or don't send report.So unable to work with forms using QTP.

3646


How does you test a weblink which is changing dynamically?

794


Which functionalities of QTP used in banking project? pls any say answer?

1659


How to do call a output parameter from one action to another action??/

2103


What are the features and benefits of quick test pro (qtp 8.0)?

806


On what document base Descriptive programming is written if build is not yet ready ?

1133