caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Markus Mottl <markus.mottl@gmail.com>
To: oliver <oliver@first.in-berlin.de>
Cc: "Stéphane Glondu" <steph@glondu.net>, caml-list@inria.fr
Subject: Re: [Caml-list] Fatal error: exception Pcre.Error(0)
Date: Thu, 22 Dec 2011 21:09:09 -0500	[thread overview]
Message-ID: <CAP_800pZ4C7g9JJSO6gBp7rEd578HqxSoKmRbO9ZuMm29t-p-A@mail.gmail.com> (raw)
In-Reply-To: <20111223012153.GA16761@siouxsie>

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 <oliver@first.in-berlin.de> 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


      reply	other threads:[~2011-12-23  2:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-22 18:39 oliver
2011-12-22 18:50 ` oliver
2011-12-22 19:53 ` Stéphane Glondu
2011-12-22 21:39   ` oliver
2011-12-22 22:35     ` Stéphane Glondu
2011-12-23  0:13       ` oliver
2011-12-23  3:35         ` Abdallah Saffidine
2011-12-23  6:29         ` Stéphane Glondu
2011-12-23 12:59           ` Pcre-Ocaml-docs (Re: [Caml-list] Fatal error: exception Pcre.Error(0)) oliver
2011-12-23  0:45       ` [Caml-list] Fatal error: exception Pcre.Error(0) oliver
2011-12-23  1:21         ` oliver
2011-12-23  2:09           ` Markus Mottl [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAP_800pZ4C7g9JJSO6gBp7rEd578HqxSoKmRbO9ZuMm29t-p-A@mail.gmail.com \
    --to=markus.mottl@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=oliver@first.in-berlin.de \
    --cc=steph@glondu.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).