On Sun, Apr 2, 2023 at 11:30 AM Paul Eggert <egg...@cs.ucla.edu> wrote:
>
> Also, GNU grep -w passes the following more-complicated regexp to dfaparse:

but AFAIK `-w` is not necessary to trigger it, as the following also
infloops in Fedora Rawhide

  $ echo a | grep -E '((()|a)|())+'

interestingly; the loop is broken if any character is added to any of
the `()` branches which might mean that this is also unlikely to
happen in well formed expressions.

Carlo

PS. -P doesn't loop and neither does `echo a | grep -E '((a|())|())+'`
nor '(()|(a|()))+` nor `(()|(()|a))+'`



Reply via email to