<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2002/12/3edc01c9d06cc487b15cb8d221e733b7"
  from="Oleg &lt;oleg_inconnu@m...&gt;"
  author="Oleg"
  date="2002-12-29T15:42:57"
  subject="[Caml-list] PCRE"
  prev="2002/12/e25e34c99997690cfe2153ff2ac43588"
  next="2002/12/e51b101f8c02ee62799b0ef474bb2852"
  next-in-thread="2002/12/e51b101f8c02ee62799b0ef474bb2852"
  prev-thread="2002/12/b386e4555a6a2f261a376b788e000fca"
  next-thread="2002/12/796b85eddae20a3dcf1ca2b3f4c5d4a1"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] PCRE">
<msg 
  url="2002/12/3edc01c9d06cc487b15cb8d221e733b7"
  from="Oleg &lt;oleg_inconnu@m...&gt;"
  author="Oleg"
  date="2002-12-29T15:42:57"
  subject="[Caml-list] PCRE">
<msg 
  url="2002/12/e51b101f8c02ee62799b0ef474bb2852"
  from="Markus Mottl &lt;markus@o...&gt;"
  author="Markus Mottl"
  date="2002-12-29T18:41:33"
  subject="Re: [Caml-list] PCRE">
</msg>
</msg>
</thread>

<contents>
Hi

I'm new to PCRE. Can anyone explain to me why the output of

# open Pcre;;
# version;;
- : string = "3.4 22-Aug-2000"
# full_split ~pat:"^(\\w+)(,(\\w+))*$" "a,b,c,d";;
- : Pcre.split_result list =
[Delim "a,b,c,d"; Group (1, "a"); Group (2, ",d"); Group (3, "d")]

does not contain Group(3, "b") and Group(3, "c") ?

Similarly, I expected 

# full_split ~pat:"S(a\\d)+" "Sa1a2";;
- : Pcre.split_result list = [Delim "Sa1a2"; Group (1, "a2")]

to produce [Delim "Sa1a2"; Group(1, "a1"); Group (1, "a2")]

The above uses the latest pcre-ocaml-4.31.0.

Thanks
Oleg
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

