[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Thanks. I was plagiarizing from XSLT 2.0 Programmer's Reference without (mentally) parsing the code closely enough. I now have what I need.
<xsl:value-of select="regex-group(1)" />
David
RE: Re: [xsl] xsl:analyze-string use clarification needed
Subject: RE: Re: [xsl] xsl:analyze-string use clarification needed From: cknell@xxxxxxxxxx Date: Tue, 23 Jan 2007 10:06:01 -0500 |
Thanks. I was plagiarizing from XSLT 2.0 Programmer's Reference without (mentally) parsing the code closely enough. I now have what I need.
<xsl:template match="/"> <xsl:variable name="position-code-candidate"> <xsl:analyze-string select="'XY02/28/2007 L'" regex="^[A-Z]+"> <xsl:matching-substring> <xsl:value-of select="." /> </xsl:matching-substring> </xsl:analyze-string> </xsl:variable> <xsl:value-of select="$position-code-candidate" /> </xsl:template>
-- Charles Knell cknell@xxxxxxxxxx - email
-----Original Message----- From: David Carlisle <davidc@xxxxxxxxx> Sent: Tue, 23 Jan 2007 14:58:38 GMT To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] xsl:analyze-string use clarification needed
<xsl:value-of select="regex-group(1)" />
group 1 is the stuff inside the first () in your regex and your regex doesn't have a () group so this is empty, use select="."
David
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Re: [xsl] xsl:analyze-string us, cknell | Thread | [xsl] how to find parent node, xslt . new |
RE: [xsl] Converting GMT time to lo, Lalit.Chanchlani | Date | Re: [xsl] xsl:analyze-string use cl, David Carlisle |
Month |
Keywords