From: Drew Adams <drew.adams@oracle.com>
To: "Buchs, Kevin J." <buchs.kevin@mayo.edu>, help-gnu-emacs@gnu.org
Subject: RE: regex nirvana - near miss
Date: Thu, 26 Jun 2014 09:35:54 -0700 (PDT) [thread overview]
Message-ID: <02623a62-1f59-4fc5-8e34-6d28aa4a7013@default> (raw)
In-Reply-To: <27747b$8snl6c@ironport10.mayo.edu>
> Often I wish to match a string not followed by another string, e.g.
> "abc" without "def" following.
Typically, what you want to do for this in Emacs Lisp is to combine
the use of a regexp for positive matching with other code that takes
care of the non-matching (negation) need.
For example, you want to find a match for `abc' that does not also
match `def' at the `abc' match end. Search for `abc', and then
programmatically exclude search hits where `def' follows `abc'.
Or if you want to complement a set of regexp matches, compute it
and then subtract it from the original search space.
next prev parent reply other threads:[~2014-06-26 16:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-26 15:18 regex nirvana - near miss Buchs, Kevin J.
2014-06-26 15:36 ` Yuri Khan
2014-06-26 16:35 ` Drew Adams [this message]
[not found] <mailman.4351.1403795929.1147.help-gnu-emacs@gnu.org>
2014-06-26 15:38 ` Stefan Monnier
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=02623a62-1f59-4fc5-8e34-6d28aa4a7013@default \
--to=drew.adams@oracle.com \
--cc=buchs.kevin@mayo.edu \
--cc=help-gnu-emacs@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.
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).