ASP Splitting string with multiple space

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cikail
    New Member
    • Mar 2007
    • 2

    ASP Splitting string with multiple space

    Hi there,

    I know there are a lot of this question in th ASP.Net section. But I'm currently in the dark. I've tried to find the answer from every search place but maybe my question was wrong. Heres the problem..

    Code:
    delimiter = " " 'can be either whitespace or others
    StringA = "Here I'm     currently finding/solutions//but couldnt find one.."
    arr = Split(StringA, delimiter)
    From here I want the array contain only the following

    arr[0] = Here
    arr[1] = I'm
    arr[2] = currently
    arr[3] = finding
    arr[4] = solutions
    arr[5] = but
    arr[6] = couldnt
    arr[7] = find
    arr[8] = one

    but it wont. Could anyone help me in this multi-whitespace, multi-delimiter problem?

    Thank you in advance and sorry if there are already this type of question. (Please refer to the link available please?)
  • cikail
    New Member
    • Mar 2007
    • 2

    #2
    Haha, my bad..

    After searching for 4 straight hours with different type of Questions, finally got the perfect answer for me..

    The link is http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQ ID=149

    silly me..

    Comment

    Working...