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 |
1) 100 test boxes there in application. how to click 100 test boxes using vb script? 2) 100 objects there in web page,how we will store that 100 objects repostries?
hi i have 4 yrs exp in manual and automation testing using QTP i need sample resumes plz can u send this mail id pbre1980@gmail.com
write a VBscript code to parametrize test script using test data from sqlserver database?
I am using "QTP 9.0" in my system, need to install java add-ins to test the java based applications, please prvide information from where i can get those java add-ins for QTP 9.0
how we connect 1. qtp9.2 to the quality center9.0? 2. Load runner8.0 to the quality center9.0
How many types of actions are there in quicktest professional (qtp)?
w is configaration management
Give one example of Standard checkpoint in qtp 10?
Explain Different types of Checkpoints in Quick Test Professional?
How to verify the Cursor focus of a certain field?
what are recovery management techiniques?
How can I deploye a 'QTP Runtime environment only'