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
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 |
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 |
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 |
what r the drawbacks and limitations of QTP?
How many types of recording facility are available in quicktest professional?
How you can delete excel file in qtp?
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)
explain how to write vb script in qtp?when will you write own script?
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.
what is the extension of action script template?
what is Supplemental Objects ?
str="ramanareddy12345@gmail.com"to count alphabets,numarics and special charcters pls any one knows send to answer
How exactly you start scripting in QTP? In the interview he was not satisfied with my answer.Please post what is correct answer.
Is manual Testing replacement of automation testing?Which types of testing we can not do in automation testing but can do in manual testing?
What are the types of object repositories? Which one is you using?