Re: [Caml-list] ocaml-pcre and UTF-8

2012-02-16 Thread Philippe Strauss
Oh found something on the PLEAC and man pcrepattern : let res_w = "^([\\p{Latin}\\-]+)$" Le 16 févr. 2012 à 10:29, Philippe Strauss a écrit : > Hello caml'ers, > > How do I convince PCRE to be UTF-8 friendly? example: > > -- > open Pcre > > external show : 'a -> string = "%show" > > let reco

Re: [Caml-list] ocaml-pcre and UTF-8

2012-02-16 Thread Mauricio Fernandez
On Thu, Feb 16, 2012 at 10:29:30AM +0100, Philippe Strauss wrote: > Hello caml'ers, > > How do I convince PCRE to be UTF-8 friendly? example: > > -- > open Pcre > > external show : 'a -> string = "%show" As an aside: where did you get this external from? I had to write a proper show function on

[Caml-list] ocaml-pcre and UTF-8

2012-02-16 Thread Philippe Strauss
Hello caml'ers, How do I convince PCRE to be UTF-8 friendly? example: -- open Pcre external show : 'a -> string = "%show" let recomp = regexp ~flags:[`UTF8; `CASELESS] let res_w = "(*UTF8)^(\w+)$" let rec_w = recomp res_w let accents = ["blurb"; "toxicité"; "velléités"; "à"; "où"; "über"; "m