Re: regex lint

From: Dag-Erling Smørgrav <des_at_des.no>
Date: Thu, 24 Sep 2009 13:36:26 +0200
grarpamp <grarpamp_at_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
-- 
Dag-Erling Smørgrav - des_at_des.no
Received on Thu Sep 24 2009 - 09:36:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:56 UTC