[Bug 251775] bsdgrep: egrep regards '{foo}' as invalid regular expression
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Dec 12 06:22:24 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251775
Yuri Pankov <yuripv at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yuripv at FreeBSD.org
--- Comment #1 from Yuri Pankov <yuripv at 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.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list