regex lint

Dag-Erling Smørgrav des at des.no
Thu Sep 24 11:36:28 UTC 2009


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


More information about the freebsd-current mailing list