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


Please Help Members By Posting Answers For Below Questions

Hi Samrat, Thank u very much, what u said it is right.

1355


How would you export a script from one pc to another in qtp?

669


what is review

1618


If the objects hierarchy is changing from build to build, then how you will handle that condition?

625


What is the difference between call to existing action and copy of an action?

607






What are metrics and matrix?

1375


Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..

1291


i need code for how to click on particular mail in utlook mail box .its urjent Thank You Balaji

1589


What is the Difference between copy to action and call to action?

595


Plz Explain How to access Or Store Script from VSS? Explain Real time work (qtp) where you store folders and next to how to you access that folders and how you maintain folders in VSS ? What are the Menu's in VSS? Suppose in Manual, by using Checkin Checkout u can access documents. how you access in QTp REal time?

1585


regular expression in qtp standar check point for months from accepting months from january to december only

1487


Explain about business process component? types and usage?

1572


what is the diff between manual test plan document and automation test plan doc.can u explain indetail.

1652


How do you check ticket cost and ticket number in flight application?

597


Hello, Is there any way to send the test results in html format (or any other) by email using outlook after the test run ends? thank you in advance

1748