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
If the weblist is identified as webelement,and by clicking on webelement if the values are displayed,and if the values the values also identified as webelement.then how to fetch the values through script?
How Can I find the least value in a bunch of variables using qtp.. E.g.:- A = 210, B = 212, C = 60, D = 111 I don’t want to write bunch of lines for this…. Is there a way to get the result in one line…..
What is business process testing(bpt) in qtp?
How do you capture tooltip using QTP?
What are the steps involved in the recovery scenario wizard?
what type of framework u r using in ur organization
What is the default object synchronization timeout in qtp?
when a test case is written how u test using qtp
What are the steps involved in recovery scenario wizard?
Our company is having a windows client server application developed in vb.net. so there is a treeview and i am not in a position to record the click events in QTP. so kindly help. Vivek
Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in
What are the types of object repository in qtp?
Explain the use of action split in qtp?
I want to capture data(using keyword) from msdos application using QTP?... Below is little work i could do on it... /* Set app=CreateObject("Wscript.shell") SystemUtil.run ("C:\Users\Agent\Desktop\pumpsim\PUMPSIM.EXE") Window(“PUMPSIM.EXE”).Activate wait(3) app.sendkeys "N" */ Thanks in advance...!!!
This is a question thats generally asked in every QTP interview. What were the problems that you faced during automation and how did you resolve them?