From owner-freebsd-current Tue Feb 20 13:56:15 2001 Delivered-To: freebsd-current@freebsd.org Received: from mail.rdc1.kt.home.ne.jp (ha2.rdc1.kt.home.ne.jp [203.165.9.243]) by hub.freebsd.org (Postfix) with ESMTP id 6518237B401 for ; Tue, 20 Feb 2001 13:55:55 -0800 (PST) (envelope-from knu@iDaemons.org) Received: from daemon.local.idaemons.org ([203.165.161.10]) by mail.rdc1.kt.home.ne.jp (InterMail vM.4.01.02.00 201-229-116) with ESMTP id <20010220215554.GMAT19464.mail.rdc1.kt.home.ne.jp@daemon.local.idaemons.org>; Tue, 20 Feb 2001 13:55:54 -0800 Received: by daemon.local.idaemons.org (8.11.1/3.7W) id f1KLtsv41569; Wed, 21 Feb 2001 06:55:54 +0900 (JST) Date: Wed, 21 Feb 2001 06:55:54 +0900 Message-ID: <863dd981ed.wl@archon.local.idaemons.org> From: "Akinori MUSHA" To: current@FreeBSD.org Cc: Craig Carey Subject: Re: find(1) -regex/-iregex In-Reply-To: <5.0.2.1.2.20010221083646.03aaf540@pop.qsi.net.nz> References: <8666i588p4.wl@archon.local.idaemons.org> <5.0.2.1.2.20010221083646.03aaf540@pop.qsi.net.nz> User-Agent: Wanderlust/2.5.4 (Smooth) SEMI/1.14.2 (=?ISO-8859-1?Q?Daish=F2?= =?ISO-8859-1?Q?ji?=) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386--freebsd) Organization: Associated I. Daemons X-PGP-Public-Key: finger knu@FreeBSD.org X-PGP-Fingerprint: 081D 099C 1705 861D 4B70 B04A 920B EFC7 9FD9 E1EE MIME-Version: 1.0 (generated by SEMI 1.14.2 - =?ISO-8859-1?Q?=22Daish=F2ji=22?=) Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At Wed, 21 Feb 2001 08:42:19 +1300, Craig Carey wrote: > What about the -iname option?. > > I recently installed GNU 'find' just to get that -iname problem fixed. > > Can you do -iname too?. Thanks for the info. It's added now. I'm ashamed to say that I couldn't resist implementing -E option to allow extended regexps. ;) The traditional and POSIX compliant basic regexp is so hard to handle that you can't even say ".+\.S?o" but "..*\.S{0,1}o".. (see re_format(7) for details) Also, I revised the manpage to describe them in detail. Please check it out: http://people.FreeBSD.org/~knu/misc/find_regex.diff > >I'd like to commit it after reviews if there is no convincing > >objection against it. Any suggestion is welcome. > > > > I would object if it is a new variant of regexp. I'd say it ought > be between egrep and perl, in its functionality. I don't think I grasp your meaning.. GNU find(1)'s -regexp uses the "basic regexp" that is _not_ the "extended regexp" which egrep(1) uses nor the one perl(1) uses. Anyway, here lists the facts: - I implemented -regexp/-iregexp using FreeBSD's standard regex library which is supposed to be compliant with POSIX.2 - The match is executed with REG_BASIC, which behavior is compatible with GNU find(1) and NetBSD find(1) - I, however, added -E so we can use extended regexp ;) - Perl's regexp is known to be a unique variant that is different from the "basic regexp" nor the "extended regexp" ;P > It sounds like a regexp would be nice. Me too. :) -- / /__ __ Akinori.org / MUSHA.org / ) ) ) ) / FreeBSD.org / Ruby-lang.org Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp "We're only at home when we're on the run, on the wing, on the fly" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message