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

How can I check if a environment variable exist or not?

542


If you giving priority as p0, as a developer if I give priority as p2, What happens In user defined function ?

592


What is QTP’s model for test creation?

683


what is clean sweep?

1521


How to use parameterization in qtp?

624






write a script to verify links on any web page by using descriptive method by creating a description object (give a filter condition only link) ... need to verify expected like name by reading

1494


Hi Friends, I worked with 8.2 not with 9.2. Please help me in this prob. I created one script and recorded some think and save as Test 1 then I opened process--open the object repository manager. Switch to file->save->give some name->save as Objectrepo1.tsr file. (This is the global repository file.) Then I went to object repository->tools-> associate repository ->click + icon ->open the previously saved Objectrepo1.tsr file. This is the global repository Now I created one more script and save as Test 2. In this script I am calling script with the Help of "Call of existing action" and I executed but QTP is not able to execute B’cos it is QTP is not able to read the Object Repository of Test 1. Please let me know why? Once I made Script 1 as a shared Obj. Repository so it would not give any Problem. Right?

1489


What are the technics follow in writing VB script?

1533


in my application,validation message has in japanise language.how to validate this message is appears properly or not

1526


I created 3 actions in test suppose I want to run action 1 in single time, action 2 is 4 time what I do?

599


i have asked earlier only one question how to test web application using QTp plz send me the answer quickly

1660


How you can delete excel file in qtp?

599


What is a Patch in QTP?

607


What is the difference between the keyword view and expert view?

528


Can any one say what exact diff between test->parameters, action properties-> parameters. after defining the parameters in test->settings, how can we access those parameters.(i know how to use action prop parameters)

1624