[racket] Some design "whys" of regexps in Racket

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Fri Jun 3 23:09:39 EDT 2011

On Fri, Jun 3, 2011 at 11:04 PM, Eli Barzilay <eli at barzilay.org> wrote:
> Four minutes ago, Rodolfo Carvalho wrote:
>> On Fri, Jun 3, 2011 at 23:49, Carl Eastlund <cce at ccs.neu.edu> wrote:
>> > The origin of #px is "Perl-compatible regular expression", while
>> > #rx are compatible with command-line tools such as egrep.
>> It seems that it's not yet documented. Good to know, now I can
>> choose between Perl and power :D
> See the top of http://docs.racket-lang.org/reference/regexp.html --
> it shows the basic shared syntax, and then there's
>  The following completes the grammar for regexp, which treats { and }
>  as literals, \ as a literal within ranges, and \ as a literal
>  producer outside of ranges.
> and a bit later
>  The following completes the grammar for pregexp, which uses { and }
>  bounded repetition and uses \ for meta-characters both inside and
>  outside of ranges.
> These blurbls summarize the difference, and the tables that follow
> them specifies the syntax formally.

I believe he means that the p in #px is not explicitly documented as
referring to the P in Perl.


Posted on the users mailing list.