How to return only alpha bate string from an string str =
"bibhu@#$%&das&*)(SUndar"

Answers were Sorted based on User's Feedback



How to return only alpha bate string from an string str = "bibhu@#$%&das&*)(SUndar&quo..

Answer / satishraja

str ="bibhu@#$%&das&*)(SUndar"
L=len(str)
For i=1 to l
x=left((right(str,l-i+1)),1)
If ASC(ucase(x))>=65 and ASC(ucase(x))<=90 then
Print x
End If
Next

Is This Answer Correct ?    0 Yes 0 No

How to return only alpha bate string from an string str = "bibhu@#$%&das&*)(SUndar&quo..

Answer / usha

str="bibhu@#$%&das&*)(SUndar"

Set r = new regexp
r.pattern="[A-Z]"
r.global=true
r.ignorecase=true
Set a =r.execute(str)
msgbox a.count
For each t in a
msgbox t
Next

Is This Answer Correct ?    0 Yes 0 No

How to return only alpha bate string from an string str = "bibhu@#$%&das&*)(SUndar&quo..

Answer / pankaja yathindrakumar

'How to return only alphabate string from an string str = "bibhu@#$%&das&*)(SUndar"

str="bibhu@#$%&das&*)(SUndar"
for i=1 to len(str)
x=mid(str,i,1)
if Asc(x)>=Asc("A") And Asc(x)<=Asc("z") then
t=t&x
End If
Next
Msgbox t

Is This Answer Correct ?    0 Yes 0 No

How to return only alpha bate string from an string str = "bibhu@#$%&das&*)(SUndar&quo..

Answer / indrani

str="bibhu@#$%&das&*)(SUndar"

Set r = new regexp
r.pattern="[A-Z]"
r.global=true
r.ignorecase=true
Set a =r.execute(str)
msgbox a.count
For each t in a
s1=s1+t
Next
msgbox s1

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?

0 Answers  


How many data types are supported in Vbscript?

3 Answers   Microsoft,


How to map test cases with Automation script? Please explain in details.With example Thanks for your co-operation(In Advance)

1 Answers   Google, IBM,


How should i Create Email invite with server-side Coding?

0 Answers   Altair,


How will you trim the spaces on the left of a string using vbscript?

1 Answers  






what is fire event method in qtp?

3 Answers   TCS,


How can I access an object in another frame?

1 Answers  


Mention how you can call vbscript functions?

0 Answers  


Explain the scope of the variables using dim, public, and private keywords respectively.

0 Answers  


Which operator is used to perform the comparison among 2 operands in the vbscript language?

0 Answers  


what is the difference between modular and data and keyword driven framework

0 Answers  


write a vb-script code to delete all the mails in my gmail in the year 2011

1 Answers  


Categories