adspace


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


Please Help Members By Posting Answers For Below Questions

I want to open a Notepad window without recording a test and I do not want to use System utility Run command as well. How do I do this?

1300


Hi,Sudhanandareddy plz forword framework and ppts for QTP to me. This is my mail id: ranjith_99reddy@yahoo.co.in (your contact number also)

2559


How are actions and functions different in QTP?

1151


Please help me by providing the License key for QTP 9.2, at guru_aarya@yahoo.co.in Best Regards Gururaj.B

3446


What is the registration process and examination fees?

1162


Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com

1864


How software tester can use constants and variables in scripts?

2341


i am looking job in perfomance testing using Loadrunner any one help me a project plz......?(Chandana) chs_29@rediffmail.com

1948


Can you brief the hurdles you faced during Automation testing?

1138


Hi Sudhananda, plz send me the QTP framework with any diagram and PPTS . I want to switch to automatio, I done QTP from professional person, but he does not give me his knowledge properly. so pls help me Thaks send me on following address mirajkar.akash@gmail.com

2479


HOw to add the recovery file at runtime to the test file .

2290


hi can anybody help with an qtp 9.2 license key please. Thanks, Nitesh.

2428


write script for bitmap image?

2117


we use a file extension .properties why is it used and where do we use it plz help me out with detailed explanation and navigation of how to use on the QTP 8.2?

2151


hi frinds i need help .i have 4 + yrs exp in testing and nearly 2 yrs exp in QTP and QC .currently iam working north fast 2 yrs iam looking for job in south is there any openings plz letme know my mail id is pbre1980@gmail.com

2154