|
From: | 土星五号 |
Subject: | Re: does emacs regular expression support (?!expression) |
Date: | Fri, 3 Feb 2012 10:12:27 +0800 |
On 2/2/12 2:45 PM, Tassilo Horn wrote:
Tim Landscheidt<tim@tim-landscheidt.de> writes:
IIUC, the Perl regex would successfully match "foo" if it were followed by
In Perl, "(?!pattern)" is a zero-width negative look-ahead
assertion. Emacs does not support these AFAIK.
I see. So when you do /foo(?!bar)/ in Perl, you'd need to do
"foo\\(?:[^b][^a][^r]\\)" in elisp.
"far", but the Emacs regexp would not.
Maybe \(?:[^b][^a][^r]\) should be \(?:[^b]\|b[^a]\|ba[^r]\)
--
Kevin Rodgers
Denver, Colorado, USA
[Prev in Thread] | Current Thread | [Next in Thread] |