[Top][All Lists]

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

Re: RE for any text, including white space

From: ken
Subject: Re: RE for any text, including white space
Date: Thu, 17 Mar 2011 06:20:11 -0400
User-agent: Thunderbird (X11/20101213)

On 03/17/2011 12:50 AM Kevin Rodgers wrote:
> On 3/16/11 3:53 PM, ken wrote:
> ...
>> If what you gave me works to find just the "f" before "</h3", then
>> something like "<h3>\\(\\[.\n\t ]*\\)</h3" should work, right?  Nope.
> . is not special within [], which is why PJ expressed the tag content as
> \\(.\\|\n\\)*?
> And \t and SPC do not have to be handled specially with respect to .,
> only \n.

I thought I read that on the web somewhere but I wasn't sure that I did,
and I don't always have 100% faith in what the web says.  So for the
sake of expediency, I thought it better to be redundant, get something
that works, then test for possible redundancies.  So thanks for the
confirmation... it saves me from having to test those.

On the first point: How elisp is to parse the period seems to have been
dreamt in Black Forest lore rather than in the hard, white light of
rationality.  That's to say: If it's a special character, why not let it
be so both within \\(.\\) and \\[.\\]??  This would seem the more
consistent, yes?  Consistency would also seem to dictate that in either
context, prepending a backslash would serve to substitute the literal
for its special meaning, as it does for so many other special
characters.  Yes, of course it's much too late to write the rules.  ACK
that.  I suppose I'm just venting a particular frustration that seems to
have me reverse-engineering frequent parts of this strange language in
order to write in it.

Thanks, Kevin, for unveiling that.  It's one less unpuzzling for me to do.

reply via email to

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