GNU bug report logs - #33793
sed bug with regular expressions

Previous Next

Package: sed;

Reported by: Uladzimir Panasiuk <v.s.panasyuk <at> gmail.com>

Date: Tue, 18 Dec 2018 17:19:02 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Uladzimir Panasiuk <v.s.panasyuk <at> gmail.com>
To: 33793 <at> debbugs.gnu.org
Subject: bug#33793: sed bug with regular expressions
Date: Tue, 18 Dec 2018 15:50:49 +0300
[Message part 1 (text/plain, inline)]
Hi. I've found the bug using sed. There is how to reproduce:
1) Run bash
2) Exec command \
echo weather -5.0 | sed
's/[^0-9\-\.]//g'
3) You will get "5.0". Expected output is "-5.0"

BUT
If you exec
echo weather -5.0 | sed 's/[^0-9\.\-]//g'
you''ll get the correct output "-5.0".

I am using GNU sed version 4.5 on Manjaro Linux.
[Message part 2 (text/html, inline)]

This bug report was last modified 6 years and 213 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.