From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pBN29Fvr015367 for ; Fri, 23 Dec 2011 03:09:15 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoQBAPrh807RVdS2kGdsb2JhbABDm2eQQwgiAQEBAQkJDQcUBCGBcgEBAQQSAiwBFAcSCwEDDAYFCw0NISEBAREBBQEKEgYTEhCHYJovCotlgmuEaT+IcQIFC4NyiBIEiDeMSopugw09hBg X-IronPort-AV: E=Sophos;i="4.71,396,1320620400"; d="scan'208";a="124387479" Received: from mail-wi0-f182.google.com ([209.85.212.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 23 Dec 2011 03:09:09 +0100 Received: by wibhr1 with SMTP id hr1so5294314wib.27 for ; Thu, 22 Dec 2011 18:09:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=qZ/OMqzQMBYj1ohKeO1n+kKmUow5czvJK3jl/L9dYBk=; b=alViUL0PdUl2N1Yrm9LfrcwiYe7m3uD+H6KGqOKCYCXVyQpYsWm6xBncteO7APnNFY uUasWVf4c72+q72HOvU25z6RVkGl7gkUSmzIu2tMpyZYN8L1WVu0tEbVltqG8JMqlkN3 C4sDOEdQfL7EwrtJHqvewg31AxcAjJL2hk49E= MIME-Version: 1.0 Received: by 10.181.12.43 with SMTP id en11mr28290154wid.6.1324606149368; Thu, 22 Dec 2011 18:09:09 -0800 (PST) Received: by 10.180.101.135 with HTTP; Thu, 22 Dec 2011 18:09:09 -0800 (PST) In-Reply-To: <20111223012153.GA16761@siouxsie> References: <20111222183914.GA6185@siouxsie> <4EF38AD4.10608@glondu.net> <20111222213956.GA8513@siouxsie> <4EF3B0BD.7040900@glondu.net> <20111223004530.GB12304@siouxsie> <20111223012153.GA16761@siouxsie> Date: Thu, 22 Dec 2011 21:09:09 -0500 Message-ID: From: Markus Mottl To: oliver Cc: =?ISO-8859-1?Q?St=E9phane_Glondu?= , caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id pBN29Fvr015367 Subject: Re: [Caml-list] Fatal error: exception Pcre.Error(0) Please read the pcre man page on partial matching: "man pcrepartial". The reason why e.g. "hsgshsn" gives you a partial match is that it ends in "n", and the pattern starts with "n". This means that the subject string might match the pattern "node" if it were extended appropriately. Regards, Markus On Thu, Dec 22, 2011 at 20:21, oliver wrote: > > > Here is what I get in examples: > > > let _ = > >  let pattern = "node" in > >  let doc     = "httpsdjshdjshdjnodeshdsden" in   (* true *) >  let doc     = "skjdfjjeroiurt//lkj" in          (* false *) >  let doc     = "skjdf" in                        (* false *) >  let doc     = "skjdfg" in                       (* false *) >  let doc     = "hsgshsn" in                      (* ~flags:[`PARTIAL] =>  Fatal error: exception Pcre.Error(0) *) >  let doc     = "http:gggggggggggg//spnnden" in   (* ~flags:[`PARTIAL] =>  Fatal error: exception Pcre.Error(0) *) > >  if Pcre.pmatch ~pat:pattern ~flags:[`PARTIAL]  doc then print_endline "true" else print_endline "false" > > > Rather looks like a true pcre-problem, not one of ocaml-pcre... ?! > > > > Ciao, >   Oliver > > -- > Caml-list mailing list.  Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > -- Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com