[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Syntactic sugar for regular expressions and URIs
From: |
Arto Bendiken |
Subject: |
Re: [Chicken-users] Syntactic sugar for regular expressions and URIs |
Date: |
Wed, 27 Jun 2007 22:30:14 +0200 |
Jim,
On 6/27/07, Zbigniew <address@hidden> wrote:
How about this patch, which extends your syntax to allow arbitrary delimiters?
I've now integrated your patch, pushed out release 1.0.2 of the egg,
and updated the wiki page accordingly (feel free to amend with more
examples of #r{...} form):
http://chicken.wiki.br/regex-literals
Thanks again!
The drawback over Perl is that nestable delimiters don't nest, so
#r(hi(bye)) is not valid; you have to escape the parentheses with
backslash, or use a different delimiter if you want grouping.
Yes. This means there are still two more features this egg could use
in order to be "perfect" (i.e. on par with Perl's and Ruby's regex
literals):
1. John's suggestion about supporting the additional PCRE trailing
modifier flags.
2. Support for nestable generalized delimiters, by keeping track of
how many of the opening delimiters have been encountered.
Patches very welcome.
--
Arto Bendiken | http://bendiken.net/