xsl-list
[Top] [All Lists]

RE: java Regex call

2003-07-10 08:17:51
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



<Prev in Thread] Current Thread [Next in Thread>