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

one last issue - non-capturing



SCSH SREs support controlling of capturing
or not with the use of , vs ,@.

It's trivial to write a utility to strip away capturing
groups from an SRE, and is useful enough that
we may want to include this as syntax:

  (w/nocapture sre ...)

which would strip all capturing groups from the
enclosed SREs.  There is no corresponding
w/capture, which would defeat the purpose.

Ideally I like the idea of libraries of regexps,
along the lines of Perl's Regexp::Common,
where this would be most useful.  An even
better option is the notion of named but non-
numbered capturing groups, where library
regexps could advertise the named groups
they provide without affecting your counts.

The problem with this is that many people
will want to implement SRFI 115 on top of
existing regexp implementations which don't
support such a feature.  As a workaround you
can just use named captures exclusively and
not rely on positions.

-- 
Alex