GNU bug report logs -
#32592
s with i modifier seems to work incorrectly
Previous Next
Reported by: Saito Takaaki <tails.saito <at> gmail.com>
Date: Thu, 30 Aug 2018 14:44:01 UTC
Severity: normal
Tags: fixed
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 32592 <at> debbugs.gnu.org (full text, mbox):
Hello assaf, thank you very much for the detailed explanation.
> > [3] sed (GNU sed) 4.4.2 on CentOS 7 (64bit)
> (I assume you meant sed-4.2.2 on CentOS)
You are right. I'm sorry for my critical mistake.
> I don't have access to 32bit cygwin, but on 64bit cygwin (windows 7)
> with sed-4.4-1 I do not experience the bug - can you confirm it still
> happens even in sed-4.4 ?
Here is the result of the command in question and the first three lines
of sed --version on 32bit cygwin on Windows 10.
--------
$ echo abcdefghijkl | sed 'h;G;s/\(a.*\).*\1/(\1)/i'
(abcdefg)hijkl
$ sed --version | head -3
sed (GNU sed) 4.4
Packaged by Cygwin (4.4-1)
Copyright (C) 2017 Free Software Foundation, Inc.
--------
Additionally, I tried the command with sed 4.4 on ideone and found
it does not happen.
https://ideone.com/pYoF5y
However, a friend showed me a more complex case which is
problematic even with sed 4.4 on ideone. The last two lines of the
output (for the identical input lines) are particularly interesting.
https://ideone.com/Sq5xJX
I hope this helps even a bit.
Thank you very much.
--
Takaaki Saito
This bug report was last modified 6 years and 282 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.