From: Andreas Schwab <schwab@linux-m68k.org>
To: 2881@emacsbugs.donarmstrong.com
Cc: Joe Corneli <holtzermann17@gmail.com>, emacs-pretest-bug@gnu.org
Subject: bug#2881: 23.0.91; inconsistent regexps with "explicitly numbered group"
Date: Fri, 03 Apr 2009 23:32:01 +0200 [thread overview]
Message-ID: <m2eiw95sq6.fsf@igel.home> (raw)
In-Reply-To: <m2ljqh5x6p.fsf@igel.home> (Andreas Schwab's message of "Fri, 03 Apr 2009 21:55:42 +0200")
Andreas Schwab <schwab@linux-m68k.org> writes:
> Joe Corneli <holtzermann17@gmail.com> writes:
>
>> Please execute the following forms with C-x C-e. Form 1
>> and Form 3 return `t' (Yes, we are looking at the
>> indicated regular expression), whereas Form 2 returns
>> `nil' (even though from the Elisp reference page "34.3.1.3
>> Backslash Constructs in Regular Expressions", it appears
>> that this form ought to return `t' like the others).
>
> `\|' applies to the largest possible surrounding expressions.
> Only a surrounding `\( ... \)' grouping can limit the grouping
> power of `\|'.
>
>> (let ((possible-environments
>> "\\(?1:lisp\\)\\|\\(?1:idea\\)\\|\\(?1:common\\)") )
>> (looking-at
>> (concat "\n*?\\\\begin{"
>> possible-environments
>> "}")))
>
>
> The three alternatives of this regexp are "\n*?\\\\begin{\\(?1:lisp\\)",
> "\\(?1:idea\\)" and "\\(?1:common\\)".
The last one is "\\(?1:common\\)}", of course.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2009-04-03 21:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <jwvocvdct45.fsf-monnier+emacsbugreports@gnu.org>
2009-04-03 19:15 ` bug#2881: 23.0.91; inconsistent regexps with "explicitly numbered group" Joe Corneli
2009-04-03 19:55 ` Andreas Schwab
2009-04-03 20:41 ` Joe Corneli
2009-04-03 21:32 ` Andreas Schwab [this message]
2009-04-03 21:38 ` Joe Corneli
2009-04-03 21:50 ` bug#2881: marked as done (23.0.91; inconsistent regexps with "explicitly numbered group") Emacs bug Tracking System
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2eiw95sq6.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=2881@emacsbugs.donarmstrong.com \
--cc=emacs-pretest-bug@gnu.org \
--cc=holtzermann17@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).