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

Re: check the type of the $pattern argument to a regul

Subject: Re: check the type of the $pattern argument to a regular expression?
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Mon, 16 Apr 2007 15:11:24 +0200
Re:  check the type of the $pattern argument to a regul
bryan rasmussen wrote:
Is there a concise description somewhere as to how they differ, are
there a large number of xslt regular expressions that are compatible
with Java regular expressions or are they basically incompatible? I
would suppose the main difference is that XSL-T regular expressions
are Unicode compatible regex's  - correct?


I don't suppose there is such an overview. Some flavors are explained in Jeffrey Friedl's famous book and some are (briefly) explained here: http://regular-expressions.info. But they don't explain W3's favorite flavor (which is to a large part one-way compatible with Perl's flavor). You could check and compare the following:


XSLT / XPath regexes: http://www.w3.org/TR/xmlschema-2/#regexs and http://www.w3.org/TR/xpath-functions/#regex-syntax
Java regexes: http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html


The most obvious differences in syntax I found are the Java specific constructs, which are not covered in W3's flavor, like \p{javaLower} etc., possessive quantifiers, Quotation (\Q - \E), end/start of text (\A and \Z) and all special constructs (there is no look-ahead/look-behind, non-capturing parentheses, flags on/of in a group etc).

Cheers,
-- Abel Braaksma

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.