Re: Bug of grep -E
Bob Proulx <[email protected]> Wed, 6 Dec 2017 11:31:52 -0700
| Newsgroups | gmane.comp.gnu.utils.bugs |
|---|---|
| Message-ID | <[email protected]> |
iPack wrote:
> [urain39@urain39-pc ~]$ cat test | grep -Eo '[0-9a-f]{32}/[0-9A-Za-z\-%_\.]+'
> a4ff5caad2fa35faa2271df9badacd35/Konachan.com%20
>
> It is bug ? or just my syntax error ?
Recent versions of grep (at least on my Debian system) report this as
an invalid expression for the reasons already noted by others. Here
using your verbatim pattern (with the invalid \- \. escaping):
$ grep -Eo '[0-9a-f]{32}/[0-9A-Za-z\-%_\.]+' /dev/null
grep: Invalid range end
Updating would add this improved validation reporting capability. :-)
Bob