xsl-list
[Top] [All Lists]

Re: [xsl] tokenizing comma separated string with quotes

2007-02-22 05:31:35

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.

David

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--