how to find number of characters(letter a) in
the sentence
Rain Rain Go away
Answers were Sorted based on User's Feedback
Answer / lak
str ="Rain Rain Go away"
d=split(str,"a")
msgbox ubound(d)
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / megha gupta
Dim Str, p,temp,i,l
i=0
Str= inputbox("Enter the string","User input 1")
p= inputbox("Enter the character you want to search in
specified string", "User Input 2")
l= Len(str)
Do while l>0
temp= left(str,1)
str= Right(str,l)
l=l-1
If (temp=p) Then
i=i+1
End If
Loop
Msgbox "Number of times "& p &" character in string is : "&
i &""
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / aditya
Dim sentence, testchar, arr
sentence = Inputbox(" Enter a sentence" )
testchar = Inputbox(" The charecter to be checked")
arr = split(sentence, testchar)
msgbox "Total number of charecter " & testchar & " in sentence " & sentence & " is " & ubound(arr)
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / usha
str="Rain Rain Go away"
set r = new regexp
r.ignorecase=true
r.global=true
r.pattern="[A]"
set p=r.execute(str)
msgbox p.count
Is This Answer Correct ? | 0 Yes | 0 No |
Explain How do you create a recordset object in vbscript?
hi Set myobj=Description.Create() myobj("type").value="submit" myobj("name").value="google search" myobj("html tag").value="button" browser("title:=google").page("title:=google").webButton (myobj).Click i was running above code in one weak back it was working fine i got result,again i opened after few days ,again i was trying to run the code it shows run time error in last line of my code ,why ?pls answer my question?
write a program to display configuration of a local system with the help of vb script.
How regexp.execute method works?
Mention what are the rules to name variable in vbscript?
Which function allows you to instantiate an object given its programmatic identifier or progid?
in qtp we ve datatable look like excel ,if we want to extract data from excel which saved in my documet how can i get that in datatable using vb script
HI how can handle dynamic image through vb script example we have to create email id fill the edit box(these latters change wrong password) i am wating your answer
What is the main difference between function and sub-procedure?
does anyone have qtp11.0 license key.Please sendit to my mail id-rrvv2011@gmail.com...Thanks
What are the rules to name variable in vbscript?
wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......