From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: how can I make regexp expression effective across many lines Date: Mon, 29 Jan 2007 13:40:26 -0800 Message-ID: References: <71ab86070701291301q34ea49e8ked19710cad016517@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1170106918 8466 80.91.229.12 (29 Jan 2007 21:41:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 29 Jan 2007 21:41:58 +0000 (UTC) To: "Michael Chen" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 29 22:41:51 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 1HBeFw-00073M-1d for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Jan 2007 22:41:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBeFv-00063b-Kz for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Jan 2007 16:41:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBeFj-000637-Ju for help-gnu-emacs@gnu.org; Mon, 29 Jan 2007 16:41:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBeFh-00061u-A4 for help-gnu-emacs@gnu.org; Mon, 29 Jan 2007 16:41:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBeFh-00061q-2C for help-gnu-emacs@gnu.org; Mon, 29 Jan 2007 16:41:25 -0500 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBeFg-0002Uz-ME for help-gnu-emacs@gnu.org; Mon, 29 Jan 2007 16:41:24 -0500 Original-Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id l0TLfLQt026326; Mon, 29 Jan 2007 14:41:21 -0700 Original-Received: from rcsmt251.oracle.com (rcsmt251.oracle.com [148.87.90.196]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l0TKmXsJ018343; Mon, 29 Jan 2007 14:41:20 -0700 Original-Received: from dhcp-4op11-4op12-west-130-35-178-179.us.oracle.com by rcsmt251.oracle.com with ESMTP id 2403602751170106827; Mon, 29 Jan 2007 14:40:27 -0700 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-reply-to: <71ab86070701291301q34ea49e8ked19710cad016517@mail.gmail.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-Whitelist: TRUE X-Whitelist: TRUE X-Brightmail-Tracker: AAAAAQAAAAI= 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:40739 Archived-At: > 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? Thanks. . matches any character except a newline character. [^\n] matches any character. Interactively, use C-q C-j to insert a newline character itself in the regexp, in place of \n. See the Elisp manual, node Syntax of Regexps, in particular about the treatment of backslash.