[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string searching and saving results to a variable

From: Perry Smith
Subject: Re: string searching and saving results to a variable
Date: Thu, 17 Feb 2011 07:30:19 -0600

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:
>>> ....
>>> <h3>Section 4</h3>
>>> but it could be multiple lines like this
>>> <h3 class="newest-chapter-section-type" align="center">On
>>> the origins of elisp confusion</h3>
>>> 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.
>>> ....
> Thanks, Perry.  That got me through that step.
> 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:
> (re-search-forward
> "name=\"\\|name[whitespace]=\"\\|name[whitespace]=[whitespace]\""
> end-heading nil nil)
> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]