GNU bug report logs - #20657
Traditional range expression not accepted in regex/dfa

Previous Next

Package: grep;

Reported by: arnold <at> skeeve.com

Date: Tue, 26 May 2015 02:43:02 UTC

Severity: wishlist

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: arnold <at> skeeve.com
To: bug-grep <at> gnu.org
Subject: Traditional range expression not accepted in regex/dfa
Date: Tue, 26 May 2015 05:42:19 +0300
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




This bug report was last modified 3 years and 33 days ago.

Previous Next


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