Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion does emacs regular expression support (?!expression)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Kevin Rodgers  
View profile  
 More options Feb 2 2012, 7:37 pm
Newsgroups: gnu.emacs.help
From: Kevin Rodgers <kevin.d.rodg...@gmail.com>
Date: Thu, 02 Feb 2012 17:37:57 -0700
Local: Thurs, Feb 2 2012 7:37 pm
Subject: Re: does emacs regular expression support (?!expression)
On 2/2/12 2:45 PM, Tassilo Horn wrote:

> Tim Landscheidt<t...@tim-landscheidt.de>  writes:
>> 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.

IIUC, the Perl regex would successfully match "foo" if it were followed by
"far", but the Emacs regexp would not.

Maybe \(?:[^b][^a][^r]\) should be \(?:[^b]\|b[^a]\|ba[^r]\)

--
Kevin Rodgers
Denver, Colorado, USA


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.