Hi...
Can anybody help me to write the vbscript for this
question..!!! Am having a string "HELLO WORLD", i want to
find how many "L"s are there.....?????
--> HANEEF <--
Answers were Sorted based on User's Feedback
str = "HELLO WORLD"
Set regex = New RegExp
regex.pattern = "L"
regex.Global = True
Set matches = regex.Execute(str)
msgbox matches.count
Is This Answer Correct ? | 10 Yes | 0 No |
Answer / nagk24
here one more using loops and inbuilt functions
cnt=0
a="HELLO WORLD"
For i=1 to len(a)
n=mid(a,i,1)
If asc(n)=asc("L")Then
cnt=cnt+1
End If
Next
print cnt
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / rajasekar
dim str,strcount,strdis
str="welcome"
strcount=split(str,"l")
strdis=ubound(strcount)
print "count" & strdis
Is This Answer Correct ? | 3 Yes | 2 No |
str = "HELLO WORLD"
str1=Replace(str,"L","")
cnt=len(str)-len(str1)
msgbox "Number of L's in str is:" cnt
Is This Answer Correct ? | 0 Yes | 0 No |
Am going to QTP testing......but i dont know coding languages like (c,c++,java,etc)and am not having interest in coding .............can i choose testing tools like qtp to learn and get a job in software......please reply me
is qtp 9.2 supported for firefox browser3.0?bcoz when i tried to create scripts with the application run on firefox browser 3.0 then qtp 9.2 didn't ct=reate the scripts?
Hoe to generate all numbers in between to numbers suppose all numbers in between 1 to 100 using vbscript give me code
The hybrid framework can be implemented for any application. Is it true?
What are the different types of recording modes?
Whether qtp 9.0 supports Test director8.0
What is quicktest professional?
How do we analyze the checkpoint results?
How do you invoke an application using the step generator in qtp?
Tell me about your project? please help me how to tell about insurance project
what is the criteria for choosing test cases for automation? Ex: if you have some 300 test cases, then how many you choose for automation. what is criteria of selecting?
3 Answers Aricent, Delhi University, TCS,
how to export the result to notepad....for example i want to enter the user name and pass word and clicking on login button ......once you click on login button the corresponding page will open ...in that page you having one list box ...here you can get either success or failure ........friends here i want export the message what ever i got either success or failure .....how to export the result to note pad