help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: does emacs regular expression support (?!expression)


From: Tim Landscheidt
Subject: Re: does emacs regular expression support (?!expression)
Date: Thu, 02 Feb 2012 21:14:40 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Tassilo Horn <tassilo@member.fsf.org> wrote:

>> does emacs regular expression support (?!expression) ?

> It would be more helpful if you'd tell us what (?!expression) would
> match, preferably with some examples.  Syntactically, emacs regexp's shy
> groups look similar.  The regular expression

>   "\\(:?foo\\|bar\\)\\([0-9]+\\)"

> matches "foo19" or "bar23", but doesn't capture foo or bar, so that
> (match-string 1) is the number.

In Perl, "(?!pattern)" is a zero-width negative look-ahead
assertion.  Emacs does not support these AFAIK.

Tim




reply via email to

[Prev in Thread] Current Thread [Next in Thread]