Subject: [xsl] a sequence of regex-group() From: "Geert Bormans geert@xxxxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 28 Oct 2015 15:20:13 -0000 |
Hi all, sanity check If I wanted a sequence of all the regex-group() values available in a matching-substring... (This is inside a function and the actual regex $re is passed in as a param, so number of item() is unknown) I expected this to be somewhat more straightforward than this, so I check <xsl:variable name="group-count" select="string-length(replace($re, '[^\(]+', ''))"/> <xsl:analyze-string select="$str" regex="{$re}"> <xsl:matching-substring> <xsl:variable name="re-groups" select="for $i in 1 to $group-count return regex-group($i)" as="item()*"/> Any thoughts? Thanks a lot Geert
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Processing 2 files and us, dvint@xxxxxxxxx | Thread | Re: [xsl] a sequence of regex-group, G. Ken Holman g.ken. |
Re: [xsl] Processing 2 files and us, Wendell Piez wapiez@ | Date | Re: [xsl] a sequence of regex-group, G. Ken Holman g.ken. |
Month |