emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#19414: closed (bug in sed)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#19414: closed (bug in sed)
Date: Mon, 04 May 2015 14:42:02 +0000

Your message dated Mon, 4 May 2015 07:41:18 -0700
with message-id <address@hidden>
and subject line Re: bug in sed
has caused the debbugs.gnu.org bug report #19414,
regarding bug in sed
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
19414: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19414
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: bug in sed Date: Fri, 19 Dec 2014 15:56:52 -0600 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 I am using sed, version 4.2.1 on a few different systems. What I have discovered is that inside a substitute command, a space alone is magically anchored at the start of the line in an anti-greedy match.

As an example, consider this input stream:

 a                     <-- leading space
b c
d  e
f    g


Along with these one-liner invocations:

sed -e 's/ *//'
sed -e 's/[ ]*//'
sed -e 's/[[:space::]]*//'
sed -e 's/ ?//'
sed -e 's/ +//'

What seems to be happening is that the wildcard match gets anchored to the beginning of the line with a zero character hit.

This case seems to apply not only to spaces but other characters.

--
Kevin Buchs   Research Computer Services   Phone: 507-538-5459
Mayo Clinic   200 1st. St SW   Rochester, MN 55905   http://mayoclinic.org




--- End Message ---
--- Begin Message --- Subject: Re: bug in sed Date: Mon, 4 May 2015 07:41:18 -0700
tags 19414 notabug
thanks

Thanks for the report, but from the responses, you can
see that this is not a bug, so I am closing this issue.


--- End Message ---

reply via email to

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