delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/30/17:35:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Mon, 31 Jan 2005 09:34:44 +1100 (EST)
From: Luke Kendall <luke DOT kendall AT cisra DOT canon DOT com DOT au>
Subject: Re: Updated: sed-4.1.3-1
To: The Cygwin Mailing List <cygwin AT cygwin DOT com>
In-Reply-To: <20050129120332.GA3778@cygbert.vinschen.de>
MIME-Version: 1.0
Message-Id: <20050130223445.729458570A@pessard.research.canon.com.au>

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019