chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Re: regex and named subpatterns


From: Robin Lee Powell
Subject: Re: [Chicken-users] Re: regex and named subpatterns
Date: Wed, 5 Mar 2008 21:13:09 -0800
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

On Wed, Mar 05, 2008 at 09:55:21PM -0500, Hans Nowak wrote:
> The way I understand it, Chicken's regex module is based on PCRE,
> and the PCRE manual mentions the (?P<name>...) syntax:
>
>        In PCRE, a subpattern can be named in one of three  ways:  (?<name>...)
>        or  (?'name'...)  as in Perl, or (?P<name>...) as in Python. References
>        to capturing parentheses from other parts of the pattern, such as back-
>        references,  recursion,  and conditions, can be made by name as well as
>        by number.
>
> (At least according to http://www.pcre.org/pcre.txt.)

Huh.  I've been a regex nerd for years and I'd never heard of that.
Certainly Perl itself, at least according to the man page I have,
doesn't support it.

> It's a bit odd though that Chicken (maybe unintentionally)
> supports the  construct in regular expressions, but provides no
> ways to make use of it.

You mean it allows you to assign the names but not reference them?
Yes, that'd be a bit silly.

-Robin

-- 
Lojban Reason #17: http://en.wikipedia.org/wiki/Buffalo_buffalo
Proud Supporter of the Singularity Institute - http://singinst.org/
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]