GeekInterview.com
Series: Subject:
Question: 20 of 737

VB Script

if var="a1bc23"->separate this string into two strings like, abc, 123
Asked by: prash036 | Member Since Mar-2012 | Asked on: Mar 28th, 2012

View all questions by prash036   View all answers by prash036

Showing Answers 1 - 1 of 1 Answers
ratna

Answered On : Jun 29th, 2012

Code
  1. dim a,x
  2. a="ab1c23"
  3. for i=1 to len(a)
  4. if asc(mid(a,i,1))<>32 then
  5. if asc(mid(a,i,1))>=97 and asc(mid(a,i,1))<=122 and asc(mid(a,i,1))>=65 and asc(mid(a,i,1))<=90 then
  6. mystring=mystring&mid(a,i,1)
  7. else
  8. if asc(mid(a,i,1))>=48 and asc(mid(a,i,1))<=57 then
  9. mynumber=mynumber&mid(a,i,1)
  10. end if
  11. end if
  12. end if
  13. next
  14. msgbox (mystring)
  15. msgbox (mynumber)

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.