RE: back references in regexen

Thanks for the information on this. I will ask for it to be put on the
agenda for the Functions and Operators meeting. 

Michael Kay

> -----Original Message-----
> From: Tobias Reif [mailto:tobiasreif@pinkjuice.com] 
> Sent: 21 May 2003 18:44
> To: public-qt-comments@w3.org
> Cc: Kay, Michael
> Subject: Re: back references in regexen
> 
> 
> Kay, Michael wrote:
> 
>  > I agree this can be a handy feature, but I don't think we 
> want to  > diverge from the XML Schema regular expression 
> syntax except for  > facilities that require more than 
> boolean matching.
> 
> Perhaps the WXS spec will one day include this feature.
> 
>  > The other consideration is that we want
>  > to stick to a core subset of features that are widely 
> available in  > existing regular expression libraries, to 
> make life livable for  > implementors.
> 
> Ruby has backreferences in regexen [1], also Perl [2], Python 
> [3], and 
> Java [4]. If a modern language (eg XSLT 2, WXS, etc) doesn't 
> currently 
> have this feature, then it should implement it IMHO.
> 
> The PCRE lib [6] provides this feature [7] for C++ etc; it 
> can be used 
> to implement regexen in many languages and apps.
> 
> Tobi
> 
> [1] last example on 
> http://www.rubycentral.com/book/tut_stdtypes.h> tml#UJ
> 
> [2]
> 
> 
http://www.perl.com/doc/manual/html/pod/perlre.html

[3] item "\number" http://www.python.org/doc/current/lib/re-syntax.html

[4] item "Back references"
http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex/Pattern.html
also http://java.sun.com/docs/books/tutorial/extra/regex/groups.html#backref

[5]
http://www.php.net/manual/en/pcre.pattern.syntax.php#regexp.reference.back-r
eferences

[6]
http://www.pcre.org/

[7] item "BACK REFERENCES"
http://www.pcre.org/pcre.txt

more:

.NET
http://msdn.microsoft.com/library/en-us/cpgenref/html/cpconbackreferencecons
tructs.asp

-- 
http://www.pinkjuice.com/

Received on Thursday, 22 May 2003 11:01:30 UTC