emacs-devel
[Top][All Lists]
Advanced

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

Re: Explicitly numbered subgroups in regular expressions


From: Richard Stallman
Subject: Re: Explicitly numbered subgroups in regular expressions
Date: Sun, 10 Jun 2007 09:19:00 -0400

    What it does is add a new regexp syntax \(?<num>:<regexp>\) which is like
    \(<regexp>\) except that it specifies explicitly the number of the subgroup.
    E.g. (and (string-match "\\(?3:a\\)" "a") (match-data)) returns (0 1 nil
    nil nil nil 0 1).  There is no backward compatibility issue with this patch:
    such regexps are currently rejected as invalid.

The feature seems useful, but how does this affect the numbering of
groups that don't specify a number?  That has to be done right, then
documented in the two manuals.





reply via email to

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