From: Richard Stallman <rms@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Explicitly numbered subgroups in regular expressions
Date: Sun, 10 Jun 2007 09:19:00 -0400 [thread overview]
Message-ID: <E1HxNJs-0005hQ-0i@fencepost.gnu.org> (raw)
In-Reply-To: <jwvfy50c28x.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Sat, 09 Jun 2007 16:37:44 -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.
next prev parent reply other threads:[~2007-06-10 13:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-09 20:37 Explicitly numbered subgroups in regular expressions Stefan Monnier
2007-06-10 13:19 ` Richard Stallman [this message]
2007-06-10 13:44 ` Stefan Monnier
2007-06-11 9:44 ` Richard Stallman
2007-06-12 18:42 ` Stefan Monnier
2007-06-12 20:56 ` Juri Linkov
2007-06-13 16:23 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1HxNJs-0005hQ-0i@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.