Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



str="ramanareddy12345@gmail.com"to count alphabets,numarics and special charcters pls any ..

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

str="ramanareddy12345@gmail.com"to count alphabets,numarics and special charcters pls any ..

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

str="ramanareddy12345@gmail.com"to count alphabets,numarics and special charcters pls any ..

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

Post New Answer

More QTP Interview Questions

what r the drawbacks and limitations of QTP?

2 Answers   NIIT,


How many types of recording facility are available in quicktest professional?

0 Answers  


How you can delete excel file in qtp?

0 Answers  


We have an application which generates links( more than thousand) based on the time stamp dynmically.Each link will download an xls file. we are supposed to click a particular link (which link to click will be obtained thru some buisiness logic).Now the issue is QTP is not recogniging the link(say Var1) though its properties showed mandatory fields text=xyz and html tag=A.I used following code to do this. Browser("ABC").Page("123").Link("text:=" &Var1,"html tag:=A").click, can any one suggest why this is not recognised by QTP though syntax is correct?(Is there any sync issue to be considered?Because on clicking the link it will take 5 mins to open that file)

3 Answers  


explain how to write vb script in qtp?when will you write own script?

0 Answers   FirstApex,


3.How to record a word doc using qtp i.e open a word doc,type something and save the doc can someone send me the code.

5 Answers  


what is the extension of action script template?

7 Answers   Capco,


what is Supplemental Objects ?

0 Answers  


str="ramanareddy12345@gmail.com"to count alphabets,numarics and special charcters pls any one knows send to answer

3 Answers   Ziynx,


How exactly you start scripting in QTP? In the interview he was not satisfied with my answer.Please post what is correct answer.

5 Answers  


Is manual Testing replacement of automation testing?Which types of testing we can not do in automation testing but can do in manual testing?

1 Answers   Hewitt, Wipro,


What are the types of object repositories? Which one is you using?

0 Answers  


Categories