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 |
what is web application and client server application.is there any difference ?
ACTUALLY I AM WORKING IN THE DISTRIBUTION DOMAIN.MY COMPANY IS PROVIDING DISTRIBUTION SOFTWARE FOR PHARMA AND FMCG DISTRIBUTORS.HERE I AM USING QTP 9.2.HERE IN MY APPLICATION WHILE RECORDING ONE WINDOW APPEARS.IN THAT I CAN SELECT THE ITEM OR NO NEED TO SELECT.BUT WHILE RUNNING THE SAME SCRIPT THE WINDOW MAY NOT APPEAR OR APPEAR.HOW TO WRITE SCRIPT FOR THIS
tell me QTP standards ?plz
There are some links on the web page,write a script to count and click those links and check the text on the page displayed on clicking the links.
1)how to write test cases in test director? not go throuth requirments and plan but should be different way i need? 2)what is the mediator between qtp and application or project?
is qtp 9.2 create the scripts with the application run on mozilla firefox browser?
can objects recogonised without repository?
There r 1000 rows and 1000 coloums , in that I want pickup a name of the coloumn , pls dont say in sql statements , in interview one of the interviewer said it was a wrong answer pls any send me answer its urgent
What is the another extension name of library file. If that is exist than what's the difference between them.
how we will use output values in qtp? is there any possibulity by descriptive programming?
My project title is "DRUG Audition and research management" it comes which domain?
please send detail navigation for merging of object ripositories in QTP 8.2
3 Answers Infosys, Ordain Solutions,