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

Subject: Re: [xsl] Regex groups / was: Re: [xsl] Move leading/trailing spaces outside (XSLT 2.0)
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Wed, 07 Feb 2007 11:13:21 +0100
Owen Rees wrote:
--On Tuesday, February 06, 2007 17:54:49 +0100 Abel Braaksma wrote:

I.e., text is: "this is a text"
regex: (t(.+)(.*))

will put the 't' in regex-group(1), the 'his is a text' in regex-group(2)
and nothing in regex-group(3)

regex-group(1) will be 'this is a text' in this example, and will be the same as the whole match. When groups are nested, the outer group match results include the inner group match results.



Oops! You are so right. Some people do have very sharp eyes ;)


for completeness: the other groups, (2) and (3) remain as explained.

-- Abel

Current Thread