str="ramanareddy12345@gmail.com"to count alphabets,numarics and special charcters pls any one knows send to answer
Answers were Sorted based on User's Feedback
Answer / usha
str="ramanareddy12345@gmail.com"
numbers=0
alphabets=0
specialchar=0
for i = 1 to len(str)
b = mid(str,i,1)
if isnumeric(b) then
numbers=numbers+1
ElseIf (asc(b)>=97)and (asc(b)<=122) or asc(i)>=65 and asc(i)<=90 then
alphabets=alphabets+1
else
specialchar=specialchar+1
End if
next
msgbox numbers
msgbox alphabets
msgbox specialchar
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / chaitanyakumar.chivukula
'Special Characters
PatternSpecialChar = "[^a-z,A-Z,0-9]"
Set objRegExp = New RegExp
objRegExp.Global = True
objRegExp.IgnoreCase = False
objRegExp.Pattern = PatternSpecialChar
Set Matches = objRegExp.Execute("ramanaReddy@123456")
for each match in Matches
a = match.value
b =b & a
Next
msgbox b
' Only Alphabetics
PatternAlphaChar = "[a-z,A-Z]"
Set objRegExp = New RegExp
objRegExp.Global = True
objRegExp.IgnoreCase = False
objRegExp.Pattern = PatternAlphaChar
Set Matches = objRegExp.Execute("ramanaReddy@123456")
for each match in Matches
a = match.value
b =b & a
Next
msgbox b
' only Numberics
PatternNumberics = "[0-9]"
Set objRegExp = New RegExp
objRegExp.Global = True
objRegExp.IgnoreCase = False
objRegExp.Pattern = PatternNumberics
Set Matches = objRegExp.Execute("ramanaReddy@123456")
for each match in Matches
a = match.value
b =b & a
Next
msgbox b
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / nitin sharma
Dim mystring
mystring = "ramanareddy12345@gmail.com"
stext = "12345"
mtext = "@"
X = split(mystring,"@")
Y = split(mystring,".")
'count character "@"
msgbox ubound(X)
'count character "."
msgbox ubound(Y)
ssearch = instr(1,mystring,stext)
msearch = instr(1,mystring,mtext)
Z = mid(mystring,ssearch,len(stext))
'count of numeric '12345'
If isnumeric(Z)=true Then
msgbox Len(Z)
End If
Is This Answer Correct ? | 0 Yes | 0 No |
what happen in object repository(shared)if we call an existing action from an external action ? and what happen in object repository(peraction)if we call an existing action from an external action ?
I have qtp 9.5 demo ver,I am not able to record the yahoo broeser.so anyone can tell me what setting i have to do in QTP for yahoo brower recording. why its not recognise the object of yahoo browser????
What are the features and benefits of Quick Test Pro(QTP)?
How to open a new test using QTP?
VB - Script Training in MUMBAI.
hi, i was adding the two numbers in qtp scripts but i didn't get the answer. see my below script, i dont know wht is the problem. i passed the value a=3 b= 2, i got the ans 32 instead of 5. i thing the problem is to be c = a+b my mail id karthis4u@gmail.com Dim a, b, c a = inputbox("enter the a ") b = inputbox("enter the b ") c = a + b print c
How to write script to display a message box having the "Date" value of the fourth mail(yahoo account). I've tried it with the web table concept but the content doesn't get displayed? Please help me out to resolve this :-)
Hi Suppose u have complex Test scripts which u vl write first and which u vl execute first
What is a Dictionary object in QTP.?
How to suppress warnings from the test results page?
what is description object?
What criteria do you use when determining when to automate a test or leave it manual?