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
An object is non standard object, i mapped it to standard object, eventhogh on mapping to standard object i cannot use the methods available on the standard object with the mapped object. How i can use those standard object methods with these mapped object. (((Note : dont tell that we can use virtual object as virtual object is to map nonstandard obj to standard obj)))
please post the interview questions for QA position in FACTSET
How to read a text file from QC using QTP. I would like to do something like this. But instead read a file from QC and NOT from my local drive. Set fso = CreateObject("Scripting.FileSystemObject") Set InputFile = fso.OpenTextFile("C:\test.txt", ForReading) Thanks
In Remote acess server how u run a test?
How is UFT 11.5 version different from UFT 12.0?
what are the frame work models of qtp?which frame work you follow in your company?and explain it process?
How to analyzing the checpoint results?
What does it mean when a check point is in red color? What do you do?
How to run a test using quicktest professional?
How to open a new test using quicktest professional (qtp)?
If you have two monitors one is of 19inch and the 2nd one is of 24inch,if you want to write same QTP script in both the two monitors is there any changes required in the script?
What is the difference between a Function and Action in QTP?
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
How to find operating system information using the qtp script?
Hi Frenz... I would like to take up the QTP certification . Can anyone tell me what is the procedure. n if anybody have the study materials pls fwd it to jkpunathil@gmail.com