Subject: Re: [xsl] regexp question From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx> Date: Sun, 12 Sep 2004 16:22:34 -0400 |
A repetition count in a regex is indicated by curly braces, not square
brackets. Remember also that in an attribute value template, curly braces
must be doubled.
<p><img src="http://graphics7.nytimes.com/images/dropcap/m.gif" width="37" height="33" align="left" border="0" alt="M" />OSCOW, ....</p>
<xsl:template match="xhtml:p"> <p> <xsl:analyze-string flags="s" select="." regex='"(.*?)"'> <xsl:matching-substring> <q><xsl:value-of select="regex-group(1)"/></q> </xsl:matching-substring> <xsl:non-matching-substring> <xsl:value-of select="."/> </xsl:non-matching-substring> </xsl:analyze-string> </p> </xsl:template>
<meta name="author" content="Chivers, C. J." /> <meta name="author" content="Myers, Steven Lee" />
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] regexp question, Michael Kay | Thread | RE: [xsl] regexp question, Michael Kay |
RE: [xsl] regexp question, Michael Kay | Date | RE: [xsl] regexp question, Michael Kay |
Month |