From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 12B67BC8E for ; Wed, 4 May 2005 04:31:15 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j442VEOL031383 for ; Wed, 4 May 2005 04:31:14 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id EAA05016 for ; Wed, 4 May 2005 04:31:13 +0200 (MET DST) Received: from yukon.yapper.org (adsl-67-120-175-89.dsl.lsan03.pacbell.net [67.120.175.89]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j442VCp0031380 for ; Wed, 4 May 2005 04:31:13 +0200 Received: from [67.120.175.90] (kenai.yapper.org [67.120.175.90]) by yukon.yapper.org (Postfix) with ESMTP id 5740C6EB; Tue, 3 May 2005 19:31:13 -0700 (PDT) Message-ID: <427833F0.6060004@cs.caltech.edu> Date: Tue, 03 May 2005 19:31:12 -0700 From: Jason Hickey User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: eliot@generation.net Cc: caml Subject: Re: [Caml-list] regexp bug? References: <4278377F.30502@generation.net> In-Reply-To: <4278377F.30502@generation.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 427833F2.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 427833F0.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 regexp:01 bug:01 regexp:01 caml-list:01 beginner's:01 ocaml:01 beginners:01 bug:01 wrote:01 matched:01 bin:01 caltech:02 caltech:02 caml:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.2 X-Spam-Level: You may wish to visit, for example, the egrep(1) man page for a description of regular expressions. Note that the [a-zA-Z] and [aA-zZ] regular expressions are different. The former contains the alphabetic characters. The latter is equivalent to [A-z], which in ASCII also contains several other characters between 'A' and 'z', including '_'. Jason Eliot Handelman wrote: > This doesn't seem right: > > > Objective Caml version 3.08.0 > open Str > > let search r str = > search_forward (regexp r) str 0; > matched_string str;; > > # search "[aA-zZ]+" "_test";; > - : string = "_test" > > whereas: > > # search "[a-zA-Z]+" "_test";; > - : string = "test" > > > -- eliot > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs -- Jason Hickey http://www.cs.caltech.edu/~jyh Caltech Computer Science Tel: 626-395-6568 FAX: 626-792-4257