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)expressionReceived 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