help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: bug in elisp... or in elisper???


From: PJ Weisberg
Subject: Re: bug in elisp... or in elisper???
Date: Tue, 22 Mar 2011 17:15:10 -0700

On 3/22/11, ken <gebser@mousecar.com> wrote:
> Fellow elispers,
>
> Something seems to be amiss in the search syntax here:
>
>  (setq aname-re-str
> "<a\\([\s-\\|\n]+?\\)name=\"\\(.*?\\)\"\\([\s-\\|\n]*?\\)>\\(\\(.\\|\n\\)*?\\)</a\\(\\(
> \\|\t\\|\n\\)*?\\)>" )
>
...
> The problem is that the 5th match-string should be either empty or
> whitespace.  But it consistently contains the last character of of the
> 4th match-string.  And these two matches are separated by the literal
> character string, "</a"!!  What's up with this?

You miscounted your '('s.  The fifth group IS inside the fourth group,
matching . or \n.

-PJ



reply via email to

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