From owner-freebsd-questions Mon Oct 2 11:37:13 2000 Delivered-To: freebsd-questions@freebsd.org Received: from smtpproxy1.mitre.org (mb-20-100.mitre.org [129.83.20.100]) by hub.freebsd.org (Postfix) with ESMTP id 9FA8037B503; Mon, 2 Oct 2000 11:37:09 -0700 (PDT) Received: from avsrv1.mitre.org (avsrv1.mitre.org [129.83.20.58]) by smtpproxy1.mitre.org (8.9.3/8.9.3) with ESMTP id OAA06942; Mon, 2 Oct 2000 14:37:01 -0400 (EDT) Received: from mailsrv2.mitre.org (mailsrv2.mitre.org [129.83.221.17]) by smtpsrv1.mitre.org (8.9.3/8.9.3) with ESMTP id OAA23639; Mon, 2 Oct 2000 14:36:50 -0400 (EDT) Received: from mitre.org ([128.29.145.140]) by mailsrv2.mitre.org (Netscape Messaging Server 4.1) with ESMTP id G1TFPO00.VRL; Mon, 2 Oct 2000 14:37:00 -0400 Message-ID: <39D8D5D9.67A3074B@mitre.org> Date: Mon, 02 Oct 2000 14:37:13 -0400 From: "Andresen,Jason R." Organization: The MITRE Corporation X-Mailer: Mozilla 4.75 [en]C-20000818M (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Mark Ovens Cc: Christopher Rued , freebsd-questions@FreeBSD.ORG Subject: Re: Perl question References: <14808.52583.347797.384055@chris.xsb.com> <20001002191537.G252@parish> <20001002192617.I252@parish> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mark Ovens wrote: > > On Mon, Oct 02, 2000 at 07:15:37PM +0100, Mark Ovens wrote: > > /a.?c.*d/; > > Doh, typo! That should read > > /a.*?c.*d/; > > BTW, your RE should have a ``*'' as well: > > /x.*?y/ > Maybe, it depends on exactly what he was trying to get. The first 3 character match where x and y are the first and third character respectivly, then x.y is exactly what you want. The smallest set of characters that have x and y as boundry values? Then your x.*?y is correct. The smallest set of characters that have x and y as boundries and have at least one character in between them? x.+?y is needed. I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" -- Larry Wall in <199806181642.JAA10629@wall.org> -- _ _ _ ___ ____ ___ ______________________________________ / \/ \ | ||_ _|| _ \|___| | Jason Andresen -- jandrese@mitre.org / /\/\ \ | | | | | |/ /|_|_ | Views expressed may not reflect those /_/ \_\|_| |_| |_|\_\|___| | of the Mitre Corporation. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message