Date: Sun, 09 Sep 2018 09:05:44 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 223524] whatis 'c++' fails with regex error Message-ID: <bug-223524-227-40709f9Vq4@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-223524-227@https.bugs.freebsd.org/bugzilla/> References: <bug-223524-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=223524 Yuri Pankov <yuripv@yuripv.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yuripv@yuripv.net --- Comment #1 from Yuri Pankov <yuripv@yuripv.net> --- There are several problems here: - by default, regcomp() is called with REG_EXTENDED, so '+' is a special character and needs to be escaped - once you quote '+', it becomes ordinary, but '+' is NOT a word character, so matching fails `whatis c+` (single plus) returns the same results as `whatis c`, as '+' means "match 1 or more occurrences". whatis could be changed to use REG_BASIC instead of REG_EXTENDED, but still, "c++" is not a word, and won't match. Given the above, this isn't really a bug as man page says "words" and not "exact strings" :-) -- 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-223524-227-40709f9Vq4>
