Date: Thu, 24 Sep 2009 13:36:26 +0200 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: grarpamp <grarpamp@gmail.com> Cc: freebsd-current@freebsd.org Subject: Re: regex lint Message-ID: <868wg460ck.fsf@ds4.des.no> In-Reply-To: <d2e731a10909232232r24c6b587peb2936ecfd5875af@mail.gmail.com> (grarpamp@gmail.com's message of "Thu, 24 Sep 2009 01:32:25 -0400") References: <d2e731a10909232232r24c6b587peb2936ecfd5875af@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
grarpamp <grarpamp@gmail.com> writes: > The first one is fine, the second one complains. > Aren't these both backed by the same regex lib? No, grep(1) uses the GNU regex library, while find(1) uses the one from libc (which, among other shortcomings, is not localized). > I prefer the former as allowing empty subexpressions saves a ton of > space on the command line by not requiring the enumeration of the > expansion. I'm not sure I understand what you mean by "enumeration of the expansion"; /(foo|)/ is equivalent to /(foo)?/, which is exactly the same length. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?868wg460ck.fsf>