This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Updated: sed-4.1.3-1


On 29 Jan, Corinna Vinschen wrote:
>  * regex addresses do not use leftmost-longest matching.  In other words, 
>    /.\+/ only looks for a single character, and does not try to find as 
>    many of them as possible like it used to do. 

Interesting: does that mean every existing script that relied on the old
behaviour must change?  I'm glad I stuck with the old "/..*/" notation
when I wanted one or more repetitions!

So \+ now works the opposite of * (\+ = shortest, * = longest)?  And .\+
is now a synonym for a single "."?  So, why would you use .\+?  Ah, I
see, it's a way of matching zero or one occurrences.  I would have
thought a new symbol would have made more sense for the new semantics,
so as to preserve backward compatibility.

Probably I've misunderstood.

luke


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]