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

Re: Escaping literal strings

This page is part of the web mail archives of SRFI 115 from before July 7th, 2015. The new archives for SRFI 115 contain all messages, not just those from before July 7th, 2015.



On Wed, Oct 16, 2013 at 08:12:51AM +0900, Alex Shinn wrote:
> On Wed, Oct 16, 2013 at 7:48 AM, Evan Hanson <evhan@xxxxxxxxxxxxxxx> wrote:
> 
> > The current proposal doesn't include any way to escape a string for
> > literal embedding in a regular expression string.
> >
> > This may be outside the SRFI's scope since one can always just use SREs
> > instead, but I figure it's worth calling attention to at least once.
> >
> 
> Note PCRE syntax is intended for a separate SRFI.  The
> API here doesn't allow PCRE strings at all

I think it is an excellent decision to keep SRFI-115 strictly
about SRE.  The whole PCRE->SRE and SRE->PCRE conversion stuff is a
whole separate issue (both would be useful, as a Scheme could support
PCRE through a native Scheme API like Irregex, or support SRE through
compiling down to some system library like PCRE (which is what SCSH did,
IIRC)).

Also, whether PCRE are supported at all seems rather separate, too
(related to backtracking/backreferences).  Whether pure Posix
basic/extended RE are supported is also important, and again, a
separate issue.  A library or SRFI which deals with "SRE string
representations" should tackle these issues.

Cheers,
Peter
-- 
http://www.more-magic.net