Results 1 to 4 of 4

Thread: [RESOLVED] Split data with 2 different delimiters

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2013
    Posts
    24

    Resolved [RESOLVED] Split data with 2 different delimiters

    Hello guys

    This is my first post here. I have a problem with my code. I try to generate data (phone numbers and names) within Listview (that has 2 columns) The data looks like:

    Code:
    123456 George
    837687 Michael
    398438 Steve
    298373 James
    I know how to do it with one delimiter like:
    Code:
     123456 George 837687 Michael 398438 Steve
    (space or vbcrlf) but in this case I have both of them. Could someone help me how to solve this issue?

    Thanks in advance

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Split data with 2 different delimiters

    You did not give much to go on. If the first part is actually in a list view then there is only 1 delimiter as each line is already separate. If the data is in a file and you need to parse it out to place it into the list then you could read the file line by line, again there would only be one delimiter.

    It the data is all stored in a string already then you could either use replace() to replace the linebreaks with a space making it only one delimiter or you could first split on the linebreaks and then loop through the resulting array and split each item on the space.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2013
    Posts
    24

    Re: Split data with 2 different delimiters

    Sorry for double posting. It was connection error it seems!

  4. #4
    Banned
    Join Date
    Nov 2012
    Posts
    1,171

    Re: [RESOLVED] Split data with 2 different delimiters

    just helping search codebank mr

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width