How to retrieve alpha bate from the alphanumeric string with
special character.

Answers were Sorted based on User's Feedback



How to retrieve alpha bate from the alphanumeric string with special character...

Answer / uday

If you are looking to retrieve only alphabet string from the
input, use below code:

str="BIBHU@#$%^^&*(sundar)(*&das"

Set r=new regexp
r.pattern="[a-z A-Z]"
r.global=true
set s=r.execute(str)
'For each letter in s
'result= letter.value&result
'Next
For i=s.count -1 to 0 step -1
Set oVal=s.item(i)
result=oVal.value&result
next
print result

To retrieve only special characters from the input use the
below regular expressions in the above code:
r.pattern="[^a-z A-Z]"
r.pattern="\W"


Thanks,
Uday
http://qtpftvideos.blogspot.com/

Is This Answer Correct ?    8 Yes 2 No

How to retrieve alpha bate from the alphanumeric string with special character...

Answer / audi7784

Str ="a0%n1@a2&n3)d4*h"
For intval=1 to Len(Str)
StrVal = Mid(Str,intval,1)
If isNumeric (StrVal) = True Then
StrNum = StrNum&StrVal
Else
StrChar = StrChar&StrVal
End If
Next
msgbox StrNum
msgbox StrChar

Is This Answer Correct ?    7 Yes 1 No

How to retrieve alpha bate from the alphanumeric string with special character...

Answer / nahush

str="Hello Uda543y %%^&"




Set objRegExp = new RegExp
objRegExp.pattern = "[a-z A-Z]"
objRegExp.global = true

Set matches = objRegExp.execute(str)
For each x in matches

result = result & x.value

Next


MsgBox result

Is This Answer Correct ?    1 Yes 0 No

How to retrieve alpha bate from the alphanumeric string with special character...

Answer / qtpbibhu@gmail.com

Str="BIBHU@#$%^^&*(sundar)(*&das" how to retrieve alpha
bates and how to retrieve special characters

Is This Answer Correct ?    0 Yes 0 No

How to retrieve alpha bate from the alphanumeric string with special character...

Answer / shekhar

a="she25bh3k"

set reg=new regexp
s1="[a-z]"

reg.pattern=s1
reg.ignorecase=true
reg.global=True

set matchs=reg.execute(a)

for each match in matchs

a= match.value
''msgbox b
str=str&a

Next
msgbox str

Is This Answer Correct ?    1 Yes 1 No

How to retrieve alpha bate from the alphanumeric string with special character...

Answer / dinesh rathod

The special characters I have chosen are just an example. Add your ... I am assuming that by "alphabet" you mean A-Z. .... Is it possible to get 0 by subtracting two unequal floating point numbers?

Is This Answer Correct ?    0 Yes 0 No

How to retrieve alpha bate from the alphanumeric string with special character...

Answer / nihar

str="BIBHU@#$%^^&*(sundar)(*&das"
set reg=new regexp
reg.global=true
reg.ignorecase=true
reg.pattern="[W]"
set x=reg.execute(str)
for each res in x
result=res.value&result
next
msgbox result

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

unable to get item from the combobox using descriptive programing. can any one give me the peice of code to schedule the booking from one place to another using DESCRIPTIVE PROGRAMING.

1 Answers  


How do I lauch my test website using code from qtp in different environmet, uat and PPTE?

0 Answers  


How to handle dynamic objects in quicktest professional?

0 Answers  


Do we have to Enable Smart Identification while running Or will it automatically be enabled ?

2 Answers  


Hi,EXCEL SHEET AND DATA TABLE . BOTH ARE SAME OR NOT?

3 Answers  






hi this is srinivasa(from blr) i complited my B.tech(e.c.e) in 2007 im searching job in s/w testing but idont have freshers resume for s/w testing please send some s/w testing resume for me(fresfers resumes only) advns thnks you

2 Answers  


in a web page hoe to check the dynamic links that rechabging with out using regular expressions

0 Answers   CTS,


· What should test in BANKING DOMAIN application ?

2 Answers   TCS,


What are the benefits of qtp?

0 Answers  


write progamming connecting QTP to database sql? this is question asked by interview? pls any answer this?

4 Answers   IBM,


Where should we turn Smart Identification ON in QTP?

5 Answers  


What is the extension of the recovery scenario file in qtp?

0 Answers  


Categories