bug-ed
[Top][All Lists]
Advanced

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

[Bug-ed] bug-ed: 0 not recognized in {n,m}


From: Digital2015 Life
Subject: [Bug-ed] bug-ed: 0 not recognized in {n,m}
Date: Fri, 18 Oct 2019 02:47:52 -0700

The bug is about {n,m} regular expression in ed.
ed does not recognize 0 in {n,m} which it should.
This can be demonstrated in the following session: {0,3} fails but {1,3} 
succeeds.


$ uname -a
Linux myhost 5.0.0-13-generic #14-Ubuntu SMP Mon Apr 15 14:59:14 UTC 2019 
x86_64 x86_64 x86_64 GNU/Linux

$ ed -V
GNU ed 1.15
Copyright (C) 1994 Andrew L. Moore.
Copyright (C) 2019 Antonio Diaz Diaz.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$ cat ttt
asef
aseg
esfg
aes
sefg

$ echo -e 'g/e\{0,3\}/s//d/g\nwq\n'  | ed -s ttt
$ cat ttt
asef
aseg
esfg
aes
sefg

$ echo -e 'g/e\{1,3\}/s//d/g\nwq\n'  | ed -s ttt
$ cat ttt
asdf
asdg
dsfg
ads
sdfg

Thanks,
Mike



reply via email to

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