Subject: bug#29613: Debian Bug#883733: grep returns 0 even if there is no match

From: Paul Eggert <[email-masked]>
Date: Fri, 8 Dec 2017 10:34:53 -0800

On 12/08/2017 03:11 AM, Santiago R.R. wrote:
> $ echo 1111111111111 | grep -E '^(11+)\1+$|^1?$' ; echo $?
> 1111111111111
> 0
>
> Shouldn't the last grep command exit 1 too?

Yes it should. This appears to be due to a longstanding bug in the glibc 
regular expression matcher. See:

https://sourceware.org/bugzilla/show_bug.cgi?id=11053