The string is like POWER STAR PAVAN , write a script for
this how to findout the number of "A" in the string ?

Answer Posted / madhulika

function VerifyLetters(S_String,S_Pattern,MatchStr)
Set OReg = new RegExp
Set S_Pattern = OReg.Pattern
OReg.IgnoreCase = True
OReg.Global = MatchStr
Set Matches = OReg.Test(S_String)
MatchFound = Matches.count
VerifyLetters = MatchFound
End Function
-------------------------------------
val = "Power star pavan"
'Calling function
msgbox VerifyLetters(val,"A",True)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi Friends, Im planning to do certifcation in mercury Automation Tool QTP.But I Didnt get any clear details regarding course syllabus, fees, where to approach, and which certification would be useful for the experienced testers? can any one send me the details?

1613


How to suppress warnings from the test results page?

690


what is vmodel?advantages and disadvantages of vmodel?

1701


How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What is the difference between them? How to handle script issues?

650


Hi Friendss..., can any body help me.. 1. Tell me your achievements(Technically)..? 2. Tell me your strengths(Technically) and weakness(Technical)..? 3. Why are you looking for change..?

1502






what is the difference btn risks & Therads in the Test plan documentation?

1695


what is the mail use of frame work(with detail). architecture for keyword driven frame work

1516


How many lines of code in each script of QTP?

4115


Have you faced any problems with object repository?

684


Hi Frenz... I would like to take up the QTP certification . Can anyone tell me what is the procedure. n if anybody have the study materials pls fwd it to jkpunathil@gmail.com

1600


What is the use of sendkeys and what are send keys

2053


Dear All , For UFT 12.02 which version QC or ALM will support ? Thanks Balaji

1024


Suppose you are using shared objects repository in your test and you want to split your present action? At that time shared object repository is single or it’s also splits?

757


How many number of actions possible in qtp?

693


why you have standardized functions? plzzz guys with real time exp. do answer

1516