From: Junio C Hamano Date: Tue, 10 Apr 2012 01:05:56 GMT Subject: Re: [PATCH] Avoid bug in Solaris xpg4/sed as used in submodule Message-ID: <7vobr0s8ej.fsf@alter.siamese.dyndns.org> In-Reply-To: <1334018233-sup-7389@pinkfloyd.chass.utoronto.ca> Ben Walton writes: > I guess widely wasn't a good choice...My search wasn't narrow enough > earlier. Was I correct in my original thinking that the range > notation isn't to be used then? So far we have tried to stay within a narrow subset of BRE (see Documentation/CodingGuidelines) in fear of upsetting exotic and/or ancient systems. I do not mind reviewing and revising the guidelines every couple of years, but for this particular case, I do not think [^/][^/]* is too bad. FWIW, it bothers me a lot more that expression does not anchor matches against path elements with explicit '/' than the issue your patch addresses, i.e. sed -e 's|[^/][^/]*/|../|g'