Tuesday, 6 July 2021

How to get string, number and special charters in given string

strstring= "Suresh12#234232%@!%%"

For i =1 to Len(strstring)
str=mid(strstring,i,1)
if IsNumeric(str) then
numeric=numeric+str

ElseIf ASC(str)>64 and ASC(str)<123 then
string1=string1+str

Else
specialChar=specialChar+str
End If
Next

msgbox "Numaric charcters are in given string : "&numeric
msgbox "String is : "&string1
msgbox "Special Charcheters are in given string : "&specialChar


No comments:

Post a Comment