[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regex nirvana - near miss
From: |
Yuri Khan |
Subject: |
Re: regex nirvana - near miss |
Date: |
Thu, 26 Jun 2014 22:36:33 +0700 |
On Thu, Jun 26, 2014 at 10:18 PM, Buchs, Kevin J. <buchs.kevin@mayo.edu> wrote:
> Often I wish to match a string not followed by another string, e.g. "abc"
> without "def" following. I had a glimpse of nirvana today when I thought of
> trying this RE: abc\(def\)\{0\}, but alas it was not to be had as it gets
> optimized and just matches "abc". It is tedious to use:
> abc\([^d]\|d[^e]\|de[^f]\), especially when the second string gets longer.
What you are looking for is called a negative lookahead assertion, and
no, Emacs currently does not support them.