From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: regexp and strings you don't want Date: Wed, 27 Aug 2003 09:13:56 -0600 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3F4CCAB4.3030903@yahoo.com> References: <6c185cf3.0308251145.6af55ffc@posting.google.com> <6c185cf3.0308261013.644386e4@posting.google.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1061998226 17666 80.91.224.253 (27 Aug 2003 15:30:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Aug 2003 15:30:26 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 27 17:30:23 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19s2Fb-00053H-00 for ; Wed, 27 Aug 2003 17:30:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19s271-0005Z8-QL for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Aug 2003 11:21:31 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news-feed1.de1.concert.net!fu-berlin.de!uni-berlin.de!170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-NNTP-Posting-Host: 170.207.51.80 Original-X-Trace: news.uni-berlin.de 1061997211 10297647 170.207.51.80 (16 [82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us Original-Xref: shelby.stanford.edu gnu.emacs.help:116174 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:12093 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12093 Chaz wrote: > Barry Margolin wrote in message news:... >>>For example, how can I search for a paragraph beginning with "The" >>>that does NOT include the word "top"? >>> >>This is something that regexps by themselves are pretty bad at. >> > > That's too bad. I wouldn't have thought it so complicated to have > some function like [^"string"], or to list strings as options, maybe > ["dog""cat""turtle"]. These would be quite handy. I don't think you understand the theory behind regular expressions, which are based on regular languages and the finite state automata that recognize them. But as Barry said, it's easy to write a function that does what you want. -- Kevin Rodgers