unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: David Kastrup <dak@gnu.org>
Cc: 20307@debbugs.gnu.org
Subject: bug#20307: 25.0.50; (regexp-opt nil ...) returns ""
Date: Sun, 12 Apr 2015 08:09:14 -0400	[thread overview]
Message-ID: <jwvegnpczyu.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <876191vfou.fsf@fencepost.gnu.org> (David Kastrup's message of "Sun, 12 Apr 2015 11:50:09 +0200")

> So something like "[b-a]" and "\([b-a]\)" or
> "[^[:unibyte:][:multibyte:]]" or something similarly contorted.

I can't remember which regexp I used last time I needed one like that,
but something like "\\`\\'a" has the advantage of being efficient (the
\` anchor at the start is detected by Emacs and prevents looking for
a match over the whole searched area).


        Stefan





  reply	other threads:[~2015-04-12 12:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-12  9:50 bug#20307: 25.0.50; (regexp-opt nil ...) returns "" David Kastrup
2015-04-12 12:09 ` Stefan Monnier [this message]
2015-04-13 14:08 ` Artur Malabarba
2015-04-13 15:19   ` Stefan Monnier
2015-04-13 15:34   ` David Kastrup
2015-04-13 15:59     ` Artur Malabarba
2019-02-25 14:57 ` bug#20307: [PATCH] make regexp-opt return a no-match return value with empty input Mattias Engdegård
2019-03-02 12:37   ` Eli Zaretskii
2019-03-02 14:21     ` Mattias Engdegård
2019-03-02 14:41       ` Eli Zaretskii
2019-03-02 14:49         ` Mattias Engdegård
2019-03-02 14:57           ` Eli Zaretskii
2019-03-02 15:24             ` Mattias Engdegård

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=jwvegnpczyu.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=20307@debbugs.gnu.org \
    --cc=dak@gnu.org \
    /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).