From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: how can I make regexp expression effective across many lines Date: Mon, 29 Jan 2007 23:11:41 +0100 Message-ID: References: <71ab86070701291301q34ea49e8ked19710cad016517@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1170108729 15288 80.91.229.12 (29 Jan 2007 22:12:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 29 Jan 2007 22:12:09 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Michael Chen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 29 23:12:02 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HBejJ-0006fh-AJ for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Jan 2007 23:12:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBejI-0007zx-JO for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Jan 2007 17:12:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBej6-0007zT-Pp for help-gnu-emacs@gnu.org; Mon, 29 Jan 2007 17:11:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBej4-0007zH-Dv for help-gnu-emacs@gnu.org; Mon, 29 Jan 2007 17:11:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBej4-0007zE-7r for help-gnu-emacs@gnu.org; Mon, 29 Jan 2007 17:11:46 -0500 Original-Received: from fmmailgate01.web.de ([217.72.192.221]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HBej3-0007qz-QU for help-gnu-emacs@gnu.org; Mon, 29 Jan 2007 17:11:46 -0500 Original-Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate01.web.de (Postfix) with ESMTP id B12E45857F70; Mon, 29 Jan 2007 23:11:43 +0100 (CET) Original-Received: from [87.193.69.79] (helo=[192.168.1.2]) by smtp07.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.107 #114) id 1HBej1-0003hx-00; Mon, 29 Jan 2007 23:11:43 +0100 In-Reply-To: <71ab86070701291301q34ea49e8ked19710cad016517@mail.gmail.com> X-Image-Url: http://homepage.mac.com/sparifankal/.cv/thumbs/me.thumbnail X-Mailer: Apple Mail (2.752.2) X-Sender: Peter_Dyballa@web.de X-detected-kernel: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40741 Archived-At: Am 29.01.2007 um 22:01 schrieb Michael Chen: > Hi, there, I have problem with newlines in regexp. Here is what I want > to do: delete anything between
to TIP OF THE WEEK inclusively. > There are many lines in between. Any regex I tried can not go through > the newline. Any idea? Make it look for something that's not between beginning and end. For =20 example [^=B7]*TIP OF THE WEEK This greedy expression would find (and delete) everything between the =20= first it finds and the last TIP OF THE WEEK in the buffer. So =20 you better use the improved form: [^=B7]*?TIP OF THE WEEK -- Greetings Pete Upgraded: Didn't work the first time.