vile
[Top][All Lists]
Advanced

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

Re: [vile] issue with regular expressions


From: Thomas Dickey
Subject: Re: [vile] issue with regular expressions
Date: Tue, 5 Dec 2006 06:10:54 -0500
User-agent: Mutt/1.3.27i

On Mon, Dec 04, 2006 at 07:55:11PM -0500, Paul Fox wrote:
> thomas wrote:
>  > 
>  > I noticed (have forgotten if this was mentioned before) that OR'd 
>  > expressions such as
>  > 
>  >    \(th\|that\|this\)
>  > 
>  > will only match "th".  That's been that way "forever", though when 
>  > investigating, I thought it was my bug.  I've changed it in my current 
>  > patch to a greedy match, so any of the alternatives above will work.
>  > Is there any reason to keep the first-match-only behavior?
> 
> no.  that's definitely a bug.  i assume no one's reported it because

anyway, I had to ask, since in the back of my mind I seemed to recall
some long-ago comment that mentioned this behavior.  It's in the chunk
that I modified to do things like

        [a-b34]\{1,2\}

and when reviewing the rcs history, I saw this going back at least to 1996
(didn't check your older archive - was mainly looking for the changes I'd
done).

I'll put out 9.5m once I'm done re-investigating the curly-brace stuff,
since reviewing my regression test for regex.c, some of the results don't
look right.  Current diff's are in

        ftp://invisible-island.net/temp/

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Attachment: pgpuDqgGJWTf5.pgp
Description: PGP signature


reply via email to

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