From owner-freebsd-current@FreeBSD.ORG Thu Sep 24 05:32:27 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 686E41065670 for ; Thu, 24 Sep 2009 05:32:27 +0000 (UTC) (envelope-from grarpamp@gmail.com) Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by mx1.freebsd.org (Postfix) with ESMTP id 041D48FC12 for ; Thu, 24 Sep 2009 05:32:26 +0000 (UTC) Received: by ewy5 with SMTP id 5so1026072ewy.36 for ; Wed, 23 Sep 2009 22:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=OuHugaJhZV7QbGTNz0GqlRgZOUQTLANlgJM3zxvVPns=; b=xpKd7zyOp3ENlL8IvQbpMTU4/FUFERRDnm2W2T391iTRuq03wt8hVsCBiZ7CynXs0Q 2yAuz8blar/WREU5NfSTHU/txRnTOfeDvTutSAV4NoXyzGcPtzBFXBIZ+KHd+p74yozL TVBVx47YQpmnJoUMbn8ql2fYzspUh+oRZadaU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=u9KvrClR/YF4BCheuh+IEdASUm9nTI7cxyvYgibJrLfnm3FTXh5VBwbJg9bxIX34s2 qeVdZYhI2qgr0F60N+t6/iTmkLq1RnlZ5q2zHogTubqB4qh4C2eJE5t0sHT81toR+5Bs AFpoAYqEblkizyVL/En/bP08sTVekuPzax8vg= MIME-Version: 1.0 Received: by 10.211.139.17 with SMTP id r17mr3585211ebn.88.1253770345813; Wed, 23 Sep 2009 22:32:25 -0700 (PDT) Date: Thu, 24 Sep 2009 01:32:25 -0400 Message-ID: From: grarpamp To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Mailman-Approved-At: Thu, 24 Sep 2009 11:17:08 +0000 Subject: regex lint X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2009 05:32:27 -0000 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