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

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

Re: How do I search for 9001 or 4001


From: Barry Margolin
Subject: Re: How do I search for 9001 or 4001
Date: Wed, 22 Aug 2012 10:45:22 -0400
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <mailman.7406.1345632926.855.help-gnu-emacs@gnu.org>,
 acomber <deedexy@gmail.com> wrote:

> I want to do a regex search for the text '4001' or '9001'.  I thought C-M-s
> 4001|9001 would work but it doesn't.  How do I do this?

4001\|9001 will work. Emacs uses basic regular expressions, which means 
that the extended regexp operators have to be escaped. This means you 
have to use \(, \|, and \) instead of (, |, and ).

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

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