Subject: Re: bug#23676: Seems egrep violates simple rules of regexps
From: Paul Eggert <[email-masked]>
To: Марк Коренберг <[email-masked]>, [email-masked]
Date: Wed, 1 Jun 2016 12:47:41 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

On 06/01/2016 12:33 PM, Марк Коренберг wrote:
> Example:
>
> $ echo qwerty | egrep -o 'we|wert'
> wert
> $ echo qwerty | egrep -o 'wert|we'
> wert

That's not a bug; it's a feature. See, for example:

https://swtch.com/~rsc/regexp/regexp1.html