[Home] [By Thread] [By Date] [Recent Entries]

Subject: tokenizing comma separated string with quotes
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Wed, 21 Feb 2007 19:06:31 +0000
Given the input

<elem>"foo, bar", baz, bom</elem>

Is there a nice one liner  / technique to return the three tokens
"foo, bar"  "baz" "bom"

eg:

<root>
 <token>foo, bar</token>
 <token>baz</token>
 <token>bom</token>
</root>

I can't see the answer for all the apparent quote escaping required...

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member