Re: [xsl] Move leading/trailing spaces outside (XSLT 2.0)

Subject: Re: [xsl] Move leading/trailing spaces outside (XSLT 2.0)
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Tue, 06 Feb 2007 15:37:57 +0100
Michael Kay wrote:

<xsl:template match="e">
  <xsl:analyze-string select="." regex="^\s*.*?\s*$">

I think that needs to be
<xsl:analyze-string select="." regex="^(\s*)(.+?)(\s*)$">
as the posted regular expression lacks parentheses to allow the later use of regex-group and as the posted regular expression matches the empty string which is not allowed.




--

	Martin Honnen
	http://JavaScript.FAQTs.com/

Current Thread