bug-grep
[Top][All Lists]
Advanced

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

bug#20657: Traditional range expression not accepted in regex/dfa


From: arnold
Subject: bug#20657: Traditional range expression not accepted in regex/dfa
Date: Tue, 26 May 2015 05:42:19 +0300
User-agent: Heirloom mailx 12.5 6/20/10

Hi.

I received a bug report for gawk by private email that a regexp of
this form: '[^0-9---]' wasn't accepted.  The bugaboo here is the "---"; it's
a range expression consisting of minus through minus, and apparently long
ago was how one got a minus into a bracket expression.

This can be seen in current grep also:

        $ ./src/grep --version
        ./src/grep (GNU grep) 2.21
        Copyright (C) 2014 Free Software Foundation, Inc.
        ...

        $ ./src/grep '[^0-9---]' /dev/null
        ./src/grep: Invalid range end

The underlying regex and, I believe, dfa routines don't accept this.
Fixing either of them is beyond my skill range, so I thought I'd
pass this one upstream to you folks.

Thanks!

Arnold





reply via email to

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