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 |
How should i Create Email invite with server-side Coding?
Which keyword is used to declare a variable in the vbscript language?
What is the output of a + b in vbscript if a = 5 and b = 10?
What is the differene between QTP 8.2 and QTP 9.0 and QTP 9.1,Pls give me answer ASAP.
Write VB script to convert from feet to inches(hint 1feet=12 inches)
What are the naming conventions while declaring a variable in the vbscript language?
How will you release the memory acquired by an array variable in vbscript?
What are subprocedures in vbscript?
Hi, I need to accept user inputs for login at runtime.I know i can use Inputbox but how to proceed further that i dont know. Thanks in advance
how does vb script help in web page designing? explain with example.
Mention what is the use of option explicit in vbscript?
Could Anybody tell me VBScript for Check if a given number is Prime number-Don't use any Built- in Functions Boolean/int is Prime(int number).. Thanks in advance.