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: Wed, 15 Jan 2003 13:46:17 -0800 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <72A87F7160C0994D8C5A36E2FDC227F504420DA9@txnexc01.americas.cpqcorp.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Trace: main.gmane.org 1042667753 9672 80.91.224.249 (15 Jan 2003 21:55:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2003 21:55:53 +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 18YvVo-0002Vk-00 for ; Wed, 15 Jan 2003 22:55:52 +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 18YvWS-00023z-05 for gnu-help-gnu-emacs@m.gmane.org; Wed, 15 Jan 2003 16:56:32 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18YvWE-0001zB-00 for help-gnu-emacs@gnu.org; Wed, 15 Jan 2003 16:56:18 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18YvTs-000135-00 for help-gnu-emacs@gnu.org; Wed, 15 Jan 2003 16:53:53 -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 18YvMu-0006SZ-00 for help-gnu-emacs@gnu.org; Wed, 15 Jan 2003 16:46:40 -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 NAA16049 for ; Wed, 15 Jan 2003 13:47:38 -0800 Original-Received: from [198.17.100.22] (G-Hill-Mac [198.17.100.22])NAA27356 for ; Wed, 15 Jan 2003 13:52:22 -0800 In-Reply-To: <72A87F7160C0994D8C5A36E2FDC227F504420DA9@txnexc01.americas.cpqcorp.net> Original-To: 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:5525 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5525 At 12:00 PM -0600 1/15/03, Bingham, Jay wrote: >Earlier versions of Emacs require a different construct, the regexp to >use in those versions is: > >"string1\\(\\|[^\n]\\)*[\n]?\\(\\|[^\n]\\)*string2" > >See http://www.emacswiki.org/cgi-bin/wiki.pl?NonGreedyRegexp for more >information. Jay, Thanks for pointing that out. I didn't know about this hack for non-greedy searches in pre-21 emacs. Unfortunately the web page you cited doesn't really explain it, just calls it a "hack" and provides a single minimalist example. I'm sure I could remember it better and use it more effectively if I understood why it works, but that is not apparent to me. Are you aware of a more in-depth discussion of this topic that I could consult? Thanks. --Greg