[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSLT Regex for Matching Curly Braces

Subject: Re: XSLT Regex for Matching Curly Braces
From: "Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 11 Jun 2019 17:33:09 -0000
Re:  XSLT Regex for Matching Curly Braces
On 11.06.2019 19:26, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote:
<xsl:variable as="xs:string" name="within-braces">
     [{]      <!--* opening bace *-->
     (        <!--* $1 *-->
       [^{}]+ <!--* not containing a brace *-->
     )        <!--* end $1 *-->
     [}]      <!--* closing brace *-->

I like this! It never came to me that I can just have text content with XML comments when defining a regex for 'x'-flag matching.

and then fn:replace($input, $within-braces, 'x'), or more likely, <xsl:analyze-string regex="$within-braces" flags="x" . .. . >

Correction: regex="{$within-braces}"

Therebs always something additional to point out here in pedantbs paradise, dear Liam!


Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.