bug-gnu-utils
[Top][All Lists]
Advanced

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

grep bug with backreferences


From: bond
Subject: grep bug with backreferences
Date: Tue, 26 Nov 2002 17:59:21 +0100
User-agent: Mutt/1.4i

Hello.

I am afraid I found a bug in grep and egrep: trying to use the regex for
palindromes (which I thank you for including in the grep documentation
at http://www.gnu.org/software/grep/doc/grep_13.html ) segfaults.

This happens both with

 egrep '^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?\9\8\7\6\5\4\3\2\1$'

and 

 grep 
'^\(.\{0,1\}\)\(.\{0,1\}\)\(.\{0,1\}\)\(.\{0,1\}\)\(.\{0,1\}\)\(.\{0,1\}\)\(.\{0,1\}\)\(.\{0,1\}\)\(.\{0,1\}\).\{0,1\}\9\8\7\6\5\4\3\2\1$'

(which of course mean the same thing...)

I say this is a bug because it didn't happen in older versions of
(e)grep.

My grep version is 2.4.2 (Debian unstable on i386).

Regards,
bond




reply via email to

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