regex lint

From: grarpamp <grarpamp_at_gmail.com>
Date: Thu, 24 Sep 2009 01:32:25 -0400
The first one is fine, the second one complains.
Aren't these both backed by the same regex lib?
Why the difference?
Which standard should apps in base adhere to?
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.

ls | egrep '^.+\.foo(\.bar|)$'

find -sE . -regex '^\./.+\.foo(\.bar|)$' -maxdepth 1
find: -regex: ^\./.+\.foo(\.bar|)$: empty (sub)expression
Received on Thu Sep 24 2009 - 03:32:27 UTC

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