what is the syntax for regular expression in QTP?
how to create user defined functions in QTP?

Answer Posted / naren

RE enables us to find objects and Text strings with varying
values
Dim re As New RegExp
Dim ma As Match
re.Pattern = "[A-Z][0-9][0-9][0-9]" ' uppercase char
followed by 2 digits
re.IgnoreCase = False ' case sensitive search
re.Global = True ' find all the
occurrences
For Each ma In re.Execute(txtSource.Text)
Msgbox "Found '" & ma.Value & "' at index " & ma.FirstIndex
Next

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

any body plz send health care domain project to me with explanation any two modules on that project. mail_id: ranjith_99reddy@yahoo.co.in

3656


How is test case write?

765


how to convert 100 into hundred repees only and viceversa

1675


What is data driver in qtp? Where we use it?

757


Explain the difference between call to action and copy action?

705


How can we retrieve the Bug Ids which are open&Reopen in status through QTP scrit?Please find the script which i tried... Dim objBugFactory, objBug Dim BugId Set TDConnection = QCUtil.TDConnection Set objBug = TDConnection.BugFactory If QCUtil.IsConnected then Reporter.ReportEvent 0, "Connected", "Connected to server: " + QCUtil.TDConnection.ServerName + chr (13) +"Project: " + QCUtil.TDConnection.ProjectName + chr (13) + "Domain: " + QCUtil.TDConnection.DomainName Reporter.ReportEvent 0, "Current time on server is","==>" & TDConnection.ServerTime Else Reporter.ReportEvent 1, "Not connected", "Not connected to Quality Center" End If If mybug.Status="Open" Then BugId=mybug.DefectId MsgBox BugId End If 'OR**********************************--------------------- -----********************************** If Bug_Fields("BG_STATUS").Value ="Open" Or "Re Open"Then BugId=Bug_Fields("BG_BUG_ID").Value MsgBox BugId End If

2765


How to connect to a database?

775


How will you check a web application for broken links using qtp?

756


in data driven testing for performing operations which method is easy from manual test data,keyword view,or from database.and why?

1553


What test cases can you automate using QTP?

840


Explain the concept of how quicktest professional (qtp) identifies object?

765


what is meant by Implicit and explicit requirements?

3853


one screen page,that contains file , browse , update and cancel buttons.when we browse a file it should get update otherwise it should go to previous page.write negative test case for that.

1697


Is QTP Supports SWT applications? If yes, can you write a sample script for opening a new package in eclipse.

3255


What is contained in the object repository?

814