How to retrieve alpha bate from the alphanumeric string with
special character.
Answer Posted / 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 |
Post New Answer View All Answers
Explain quicktest professional testing process?
How do you configure QTP AND Test director?
Hybrid framework supports Descriptive programming. Is it true?
How can you handle exceptions in qtp?
How do you delete unwanted results in qtp?
can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?
I want to write some certification courses, so friends could you guide me? which certification is best and how to write exam and what tutorials need to be studied,what to do first, I am working on automation tool QTP 9.2
How to run a test using quicktest professional?
Why do we use breakpoints in QTP?
What are the key points to create a framework in QTP for oracle forms?
How many types of recording facility are available in quicktest professional?
When I click on a link in web page.Link should open in new window.can anyone please let me know the script for this ---Koti
any body plz send health care domain project to me with explanation any two modules on that project. mail_id: ranjith_99reddy@yahoo.co.in
Is qtp supports uni-code?
Mention what are the different types of recording modes in qtp? Which will be used when?