in reply to extracting the key value pairs from a string

Aside from the solution...the main problem here is you're trying to cram so much into single lines that you don't know what's going on. Slow down a little, especially when things aren't working.
  • Comment on Re: extracting the key value pairs from a string