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

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

Re: Trouble with regexp


From: Alan Mackenzie
Subject: Re: Trouble with regexp
Date: 22 May 2008 18:47:44 +0200
Date: Thu, 22 May 2008 18:47:44 +0200 (CEST)


Hi, TLS!

On Thu, 22 May 2008, TheLonelyStar wrote:


Hi,

I some trouble with regular expression. I thought, the regexp "\(foo\|bar\)"
should match either foo and bar.
But  if I have a buffer with "foo" in it, the regexp build does not match it
with that :(.

Are you sure your regexp is what you think it is? If you are typing it into an elisp program, you need to write:

    "\\(foo\\|bar\\)"

. If you've done C-M-s and are typing into the minibuffer, you don't double the quotes.

Thanks!
Nathan

--
Alan Mackenzie (Nuremberg, Germany).




reply via email to

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