Skip to main content
The 2024 Developer Survey results are live! See the results

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

11
  • 1
    do you have control over the input format?
    – Stefan
    Commented May 31, 2011 at 11:01
  • @Jason - i am trying to get control, in which case i will change the separator character but i am still concerned that whatever character i use as a separator could also be in the value field.
    – leora
    Commented May 31, 2011 at 11:02
  • 3
    Is it at least enforced that there is no : possible inside values? if not, you are stuck. If you generate the long string, then you have the possibility to escape the characters to avoid the trouble, but then you'll need something better than Split to read the input.
    – jdehaan
    Commented May 31, 2011 at 11:03
  • @jdehaan - good point. I know there is definitely no ":" in the key but i can possibly imagine that showing up in the value one day (even though i can't find an example now). I obviously want to be a bit future proof
    – leora
    Commented May 31, 2011 at 11:04
  • 12
    this cannot be done. How do you know if a word belongs to the value or to the next key?
    – vidstige
    Commented May 31, 2011 at 11:09