From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Perry Smith Newsgroups: gmane.emacs.help Subject: Re: string searching and saving results to a variable Date: Thu, 17 Feb 2011 07:30:19 -0600 Message-ID: <9889F717-9CDF-4E15-92AC-5E9D94C3E93D@gmail.com> References: <4D5B0901.5080100@mousecar.com> <4D5CFDCA.3040705@mousecar.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1297949458 7583 80.91.229.12 (17 Feb 2011 13:30:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 17 Feb 2011 13:30:58 +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 Feb 17 14:30:50 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 1Pq3wY-0008MZ-8k for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Feb 2011 14:30:50 +0100 Original-Received: from localhost ([127.0.0.1]:48605 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pq3wW-0001C8-UY for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Feb 2011 08:30:48 -0500 Original-Received: from [140.186.70.92] (port=42476 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pq3wA-0001By-H6 for help-gnu-emacs@gnu.org; Thu, 17 Feb 2011 08:30:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pq3w9-0001LC-Du for help-gnu-emacs@gnu.org; Thu, 17 Feb 2011 08:30:26 -0500 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:38024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pq3w9-0001Ks-A1 for help-gnu-emacs@gnu.org; Thu, 17 Feb 2011 08:30:25 -0500 Original-Received: by vws10 with SMTP id 10so1083567vws.0 for ; Thu, 17 Feb 2011 05:30:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer; bh=TzG0TUZXmHdhCYRY4VTQR4u7Oi8QvshzJYpyol2SnOM=; b=k/9SCpcF3tga7CshIJCOyVFrel4nNh4nBzqwpeqc6enMk5MXRhPJfShSC7sTu43HVC 1P1FEGQr18PHg4pozuLcK+stOkSH6a8FogwYnBTPZbVZ+4k6y6EilzPILCfI2suh2B9b jyOz5MJV8O7hYXjnn4x0Mxpw1L+TAZz8/qqHg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=pvDfOUWhdH4WuRKdx9ovdcaEIOEmpSkBayVSYSpyP5rqF1PNIAiTriBqn7JMAxNJqo fkd3doqkxuY87Z9qyvH94MVK6osyRNF80HzmMlkyQknJwYHibLZt7VH17hbbed51+p5D PrxrPD9kbZfnTDoDhYJSLLml6Q7jTTWVmfgbI= Original-Received: by 10.52.164.36 with SMTP id yn4mr154132vdb.261.1297949423442; Thu, 17 Feb 2011 05:30:23 -0800 (PST) Original-Received: from [10.0.0.2] ([64.128.19.234]) by mx.google.com with ESMTPS id b5sm411256vcx.28.2011.02.17.05.30.21 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 17 Feb 2011 05:30:22 -0800 (PST) In-Reply-To: <4D5CFDCA.3040705@mousecar.com> X-Mailer: Apple Mail (2.1082) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.212.41 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:79190 Archived-At: On Feb 17, 2011, at 4:51 AM, ken wrote: > On 02/15/2011 06:33 PM Perry Smith wrote: >> On Feb 15, 2011, at 5:15 PM, ken wrote: >>=20 >>> .... >>>=20 >>>

Section 4

>>>=20 >>> but it could be multiple lines like this >>>=20 >>>

On >>> the origins of elisp confusion

>>>=20 >>> It could even be three or four lines long. Also, the line(s) could = be >>> indented and so have unwanted white space in the first several = columns. >>>=20 >>> .... >=20 > Thanks, Perry. That got me through that step. >=20 > Next little thing: I want to check if the initial heading tag might > *already* contain the "name" attribute. So with the point at the = start > of that tag, I'd do something like this: >=20 > (re-search-forward > "name=3D\"\\|name[whitespace]=3D\"\\|name[whitespace]=3D[whitespace]\"" > end-heading nil nil) >=20 > Is there a shortcut way in elisp to express any and all combinations = of > whitespace...? if not, how to do this? The answer to your question appears to be `\s ' is for any whitespace character. (backslash s space) But let me try to teach you how to fish. In emacs, do C-h i to get into "Info". On some systems, that will not = work at all and thats bad. On other systems, it will put you into a larger = directory of "Info" topics. Search down and pick "Emacs". C-h m will tell you = something about the Info mode that you are in to teach you how to work within info. On other systems, the initial C-h i puts you into the Emacs info = (like on my Mac). Once you get into Info and get into the Emacs node, look for Regular and = you will see at least three topics. One is Regexp Backslash. That has the info I just found for your. One reply to your question asked which mode you are in. A good mode = will understand the html far better than your searches. HTH, Perry