From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: PJ Weisberg Newsgroups: gmane.emacs.help Subject: Re: RE for any text, including white space Date: Wed, 16 Mar 2011 15:05:28 -0700 Message-ID: References: <4D80B9BE.2070105@mousecar.com> <4D813140.6090402@mousecar.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1300327720 1278 80.91.229.12 (17 Mar 2011 02:08:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 17 Mar 2011 02:08:40 +0000 (UTC) Cc: GNU Emacs List To: gebser@mousecar.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 17 03:08:36 2011 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.69) (envelope-from ) id 1Q02df-0005vK-GD for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Mar 2011 03:08:35 +0100 Original-Received: from localhost ([127.0.0.1]:49038 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q02de-0004uS-NF for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Mar 2011 22:08:34 -0400 Original-Received: from [140.186.70.92] (port=45425 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzyqU-0008Fg-L4 for help-gnu-emacs@gnu.org; Wed, 16 Mar 2011 18:05:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzyqP-00027h-QG for help-gnu-emacs@gnu.org; Wed, 16 Mar 2011 18:05:30 -0400 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:62328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzyqP-00027b-Nu for help-gnu-emacs@gnu.org; Wed, 16 Mar 2011 18:05:29 -0400 Original-Received: by vws4 with SMTP id 4so2645841vws.0 for ; Wed, 16 Mar 2011 15:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=qvgdozmrdmxpfAEQrwEXhubDJURYtvRD3vfW5cPoKvA=; b=pY/c3yTg34hIIUZnG3gsPFE/GtoWhYz/ri68N6TVMMAurboo5O7aJ+JvCKstn5VrDx 1/1UrTgzZDn9+As0nA5/6SQ8qs+Au898OUNvECdXuc19tIdNUFTRUPlwS2C5pCfWRUSJ qQwgBEnHl6B6S/swRtxwYgqqnGd6L3GhToMJE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=GjQ6RlCeVCItybKvQMHyvN2b3qvKaOyCirm1sQllGzEEDkzruZQCQZj8bCsRVHRtqn EhTVaNOaNhqt9hMXR0GY28lOvrun7pbeJ5m4Ngx7zEASRVDRFN8NMBeijEmP0YbxntPe B1e/cS2lYpB80FsH7V5zBP4GzrTrZDR+2hy3g= Original-Received: by 10.220.186.131 with SMTP id cs3mr160929vcb.38.1300313128874; Wed, 16 Mar 2011 15:05:28 -0700 (PDT) Original-Received: by 10.220.11.79 with HTTP; Wed, 16 Mar 2011 15:05:28 -0700 (PDT) In-Reply-To: <4D813140.6090402@mousecar.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.212.41 X-Mailman-Approved-At: Wed, 16 Mar 2011 22:07:48 -0400 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:80193 Archived-At: On Wed, Mar 16, 2011 at 2:53 PM, ken wrote: > On 03/16/2011 03:40 PM PJ Weisberg wrote: >> On 3/16/11, ken wrote: >>> What's the RE for any text, white space included? =A0I also want to gra= b >>> (for match-string...) this text. =A0The text is bounded by known >>> characters. =A0E.g., >>> >>>

Any Text-- >>> Hot Stuff

>> In the above, how to grab the text of the title, i.e., everything >>> between

and

? =A0Conceivably this title text might contain >>> *anything* except ">> >> >> If A and B are your start and end points, then you want: >> >> "A\\(.\\|\n\\)*?B" > > That's almost it, but not quite. =A0It grabs only the on last character > before the "B"; in my example above it grabs just "f". =A0I'm needing to = grab: > > "Any Text--
> Hot Stuff" > > -- without the quotes, of course. Well, it *matches* the whole thing; it's just that the parentheses only grab the last character. Put in another set of parentheses around the part you want to capture, and you're golden. "

\\(\\(.\\|\n\\)*?\\)