RE: [xsl] java Regex call

Subject: RE: [xsl] java Regex call
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Thu, 10 Jul 2003 16:17:51 +0100
> Generally I don't know how many matches there will be.
> Wanted some way to iterate over all of them.
> 

<xsl:analyze-string> iterates over the substrings of the source string
that the regex does or does not match.

regex-group(n) gives you the part of the current match that was matched
by a particular sub-pattern. If the regex is known statically, then the
number of sub-patterns is known statically. It doesn't make sense to
iterate over these groups because you only get one for each
parenthesized group in the regex.

I know that's not very clear...

Michael Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread