Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Sep 2009 01:32:25 -0400
From:      grarpamp <grarpamp@gmail.com>
To:        freebsd-current@freebsd.org
Subject:   regex lint
Message-ID:  <d2e731a10909232232r24c6b587peb2936ecfd5875af@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d2e731a10909232232r24c6b587peb2936ecfd5875af>