Re: [xsl] tokenizing comma separated string with quotes

Subject: Re: [xsl] tokenizing comma separated string with quotes
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Thu, 22 Feb 2007 13:03:14 +0000
On 2/22/07, David Carlisle <davidc@xxxxxxxxx> wrote:

> is there a modification to the regex to not include the surrounding quotes?

 <xsl:variable name="regex">
     <xsl:text>\s*"(([^"]*)"|([^,]+))\s*</xsl:text>
   </xsl:variable>

then use
<xsl:value-of select="concat(regex-group(2),regex-group(3))"/>

Only one of the groups will be non-empty, but concating them together is
probably easier than testing which group you need.

Thanks David, I'll take it from that there's no straightforward modification to the regex...

This is one of the problems that looks straightforward to start with
but is actually much more complicated.

Current Thread