GNU bug report logs -
#20571
sed 4.2.2
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Thu, 14 May 2015 08:05:54 -0700
with message-id <CA+8g5KHQtH+=aCO2W5oU_-ALLaYaKnQ1sMvGW8ujfn+Z_Swq2A <at> mail.gmail.com>
and subject line Re: bug#20571: sed 4.2.2
has caused the debbugs.gnu.org bug report #20571,
regarding sed 4.2.2
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
20571: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20571
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Good morning,
the file contains "8.25F, \n". I notice a strange behavior with this line:
sed -i -r 's/([0-9])F([,; \]\}\)])/\1\2/g' file
while I'm expecting to get "8.25, \n", the content is not changed. To get the expected substitution, I must use:
sed -i -r 's/([0-9])F([,; \}\)])/\1\2/g' file
as if it is not legal to use the escaped character ']'.
Thanks for your time; I apologize if I'm wrong.
Best Regards
Massimo Masotti - Italy
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
tags 20571 notabug
thanks
On Thu, May 14, 2015 at 3:28 AM, Davide Brini <dave_br <at> gmx.com> wrote:
> On Thu, 14 May 2015 10:19:43 +0200 (CEST), Massimo Masotti
> <max.mas <at> libero.it> wrote:
>
>> Good morning,
>>
>> the file contains "8.25F, \n". I notice a strange behavior with this line:
>>
>> sed -i -r 's/([0-9])F([,; \]\}\)])/\1\2/g' file
>>
>> while I'm expecting to get "8.25, \n", the content is not changed. To get
>> the expected substitution, I must use:
>>
>> sed -i -r 's/([0-9])F([,; \}\)])/\1\2/g' file
>>
>> as if it is not legal to use the escaped character ']'.
>
> If you want to use a "]" inside a bracket expression, specify it as the
> very first character (after the ^ negation, if present, but that's not
> your case). And you don't need to escape } and ) inside the bracket
> expression, so
>
> sed -i -r 's/([0-9])F([],; })])/\1\2/g' file
>
> Here what's inside the [] is
>
> ],; })
Thanks for helping, Davide.
Massimo, I'm marking this as "notabug" and closing the auto-filed issue.
This bug report was last modified 10 years and 92 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.