[Bug 251775] bsdgrep: egrep regards '{foo}' as invalid regular expression

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Dec 12 07:14:08 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251775

--- Comment #4 from Yuri Pankov <yuripv at FreeBSD.org> ---
(In reply to Yasuhiro KIMURA from comment #3)
As a matter of fact, yes:

* '(foo|)':
----------------------------------------------------------------------
|
    The vertical-line is special except when used in a bracket expression. A
vertical-line appearing first or last in an ERE, or immediately following a
vertical-line or a left-parenthesis, or immediately preceding a
right-parenthesis, produces undefined results.
----------------------------------------------------------------------

* '.{0,256}':
We have RE_DUP_MAX defined to 255 (see /usr/include/limits.h).


For reference:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html

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


More information about the freebsd-bugs mailing list