[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Aw: [xsl] a sequence of regex-group()
Subject: Aw: [xsl] a sequence of regex-group() From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 28 Oct 2015 20:52:50 -0000 |
It sounds as if http://www.w3.org/TR/xpath-functions-30/#func-analyze-string might allow better control about matches and captured groups as it returns all imformation as XML. -- Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet. "Geert Bormans geert@xxxxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>schrieb: 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 XSL-List info and archiveEasyUnsubscribe (by email) XSL-List info and archiveEasyUnsubscribe (by email)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] a sequence of regex-group, Geert Bormans geert@ | Thread | Re: Aw: [xsl] a sequence of regex-g, Geert Bormans geert@ |
Re: [xsl] a sequence of regex-group, Geert Bormans geert@ | Date | Re: Aw: [xsl] a sequence of regex-g, Geert Bormans geert@ |
Month |