Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Dec 2020 06:22:24 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 251775] bsdgrep: egrep regards '{foo}' as invalid regular expression
Message-ID:  <bug-251775-227-gYAvWHh1tU@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-251775-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-251775-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D251775

Yuri Pankov <yuripv@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yuripv@FreeBSD.org

--- Comment #1 from Yuri Pankov <yuripv@FreeBSD.org> ---
It's not grep itself, it's our regex implementation.

POSIX says it's UB:

*+?{
    The asterisk, plus-sign, question-mark, and left-brace shall be special
except when used in a bracket expression. Any of the following uses produce
undefined results:
    - If a left-brace is not part of a valid interval expression

re_format(7) is free interpretation of the standard.

FWIW, the best way is to fix your regular expressions.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-251775-227-gYAvWHh1tU>