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

RE: two regexp related questions

Subject: RE: two regexp related questions
From: Tony Nassar <tnassar@xxxxxxxxxxxx>
Date: Thu, 19 May 2011 11:18:50 -0700
RE:  two regexp related questions
If you're on XSLT 2.0, you really want to be using <xsl:analyze-string> for

From: Julian Reschke [julian.reschke@xxxxxx]
Sent: Thursday, May 19, 2011 1:45 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  two regexp related questions

Hi there,

I've got two regexp-related questions.

1) Is it correct that XSLT/XPath2's regular expressions do not support
non-capturing groups (as shown in

2) With respect to analyze-string, and the captured regex-groups:

I'm using a regex like

   ([A-Z]+) = ([A-Z]+) ( ; ([A-Z]+) = ([A-Z]+) )*

for matching things like


Works fine, but the regex-group function only returns values for the
last match, so, with the example above, I can capture

  a=b (because it's a non-repeating part)



I've worked around this by using recursion, feeding the "remainder" into
another template.

Is there a simpler way to achieve this?

Best regards, Julian

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.