From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Greg Hill Newsgroups: gmane.emacs.help Subject: Re: line-spanning regexp Date: Tue, 14 Jan 2003 17:47:03 -0800 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <7f477f72.0301141559.3e01705f@posting.google.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Trace: main.gmane.org 1042595214 23435 80.91.224.249 (15 Jan 2003 01:46:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2003 01:46:54 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18Ycdn-00065b-00 for ; Wed, 15 Jan 2003 02:46:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18Ycei-0001X7-04 for gnu-help-gnu-emacs@m.gmane.org; Tue, 14 Jan 2003 20:47:48 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18YceP-0001W8-00 for help-gnu-emacs@gnu.org; Tue, 14 Jan 2003 20:47:29 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18YceO-0001Uh-00 for help-gnu-emacs@gnu.org; Tue, 14 Jan 2003 20:47:28 -0500 Original-Received: from renfield.synergymicro.com ([153.105.4.30] helo=synergymicro.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18YceN-0001U8-00 for help-gnu-emacs@gnu.org; Tue, 14 Jan 2003 20:47:28 -0500 Original-Received: from synergy.synergy.encinitas.ca.us ([153.105.4.29]) by synergymicro.com (8.9.3/8.9.3) with ESMTP id RAA06227; Tue, 14 Jan 2003 17:48:27 -0800 Original-Received: from [198.17.100.22] (G-Hill-Mac [198.17.100.22])RAA14780; Tue, 14 Jan 2003 17:53:08 -0800 In-Reply-To: <7f477f72.0301141559.3e01705f@posting.google.com> Original-To: tennis_smith@yahoo.com (Tennis Smith), help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5495 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5495 At 3:59 PM -0800 1/14/03, Tennis Smith wrote: >Hi, > >How do I construct a regexp that looks for two strings that *might* span >two consecutive lines? > >For example, I need a regexp that will find string1 and string2 and >everything in between for the following scenarios: > > >blah blah blah blah string1 blah blah string2 blah blah blah > >-OR- > >blah blah string1 blah >string2 blah blah > >TIA, >-Tennis "string1[^\n]*[\n]?[^\n]*string2" --Greg