From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id C212DBB81 for ; Thu, 23 Dec 2004 03:33:23 +0100 (CET) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBN2XLQ5013493 for ; Thu, 23 Dec 2004 03:33:22 +0100 Received: from [192.168.1.200] (ppp194-89.lns1.syd2.internode.on.net [203.122.194.89]) by smtp1.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id iBN2XDRF045087; Thu, 23 Dec 2004 13:03:14 +1030 (CST) Subject: Re: [Caml-list] Str.string_match incorrect From: skaller Reply-To: skaller@users.sourceforge.net To: David Brown Cc: William Lovas , caml-list@yquem.inria.fr In-Reply-To: <20041222165846.GA30503@old.davidb.org> References: <1103687369.6979.50.camel@pelican.wigram> <20041222074455.GA81342@trout> <20041222080009.GA4501@force.stwing.upenn.edu> <1103731044.6979.109.camel@pelican.wigram> <20041222165846.GA30503@old.davidb.org> Content-Type: text/plain Organization: Message-Id: <1103769192.3443.51.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 23 Dec 2004 13:33:13 +1100 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 41CA2E71.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 sourceforge:01 wrote:01 wrote:01 lovas:01 behaves:01 regexp:01 denotes:01 glebe:01 061:98 expression:01 expression:01 nsw:01 strings:01 strings:01 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: On Thu, 2004-12-23 at 03:58, David Brown wrote: > On Thu, Dec 23, 2004 at 02:57:25AM +1100, skaller wrote: > > On Wed, 2004-12-22 at 19:00, William Lovas wrote: > > > On Tue, Dec 21, 2004 at 11:44:55PM -0800, Evan Martin wrote: > > > > This is consistent with the docs, which say: > > > > [string_match r s start] tests whether the characters in s starting at > > > > position start match the regular expression r. > > > > and in general with how regular expression systems work. > > > > Then they're simply wrong. The fundamental operation is > > to check if a string is in a regular set of strings. > > Plainly 'aa' is not in the set { 'a' }. > > This is a strange notion of right and wrong. The function behaves exactly > as it is specified in the documentation. Huh? I'm really confused. Two people think the documentation is correct for the behaviour. I do not -- Saying string x is matched by regexp r means to me the same as x is a member of the regular set of strings r denotes and with that interpretation there is no possible doubt that the documentation is wrong and should say matches a prefix of the argument string in order to describe the behaviour. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net