str="ramanareddy12345@gmail.com"to count alphabets,numarics and special charcters pls any one knows send to answer
Answer Posted / 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 |
Post New Answer View All Answers
How to get the particular property value?
Hi All, How to Compare two strings character by character in QTP
Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com
How to release all resources file from the QTP?
How you can make an action as re-usable action?
I have 5 save buttons in 5 tabs . The tabs are placed one after the other. My object repository have these added as 5 save buttons with name sav1, save 2, save 3 , save 4, save 5 .all are getting highlighted from OR but they are not getting clicked. After spying each button all the properties are same except First button Index 0 html id:=btnSaveTab1 outerhtml:=", Second button "html id:=btnSave "outerhtml:=", Third button "html id:=", outerhtml:=",
Limitations in QTP?
Hi, i run scripts in one machine those r passed.when i run the scripts in client side those r failed.Give me such a scenario when ever u faced?
if anyone has idea of the interview procedure in covansys, plz send me a mail?
How to check which add-ins are associated with a test in qtp?
What is the meaning Work bench?
What is action?
Give the syntax to load function at run time.
what is clean sweep?
Why to use descriptive programming?