v1 was here: https://www.redhat.com/archives/libguestfs/2017-September/msg00135.html This is a more complete evolution of the earlier patch. It replaces most important uses of Str with PCRE throughout the code. It also extends the bindings with some useful features like case-insensitive regexps. The main places I *didn't* touch are the generator (GObject uses Str extensively); and common/mlstdutils which cannot use PCRE because it cannot depend on C code. But pretty much everything else has been converted now. - - - Same question as before:
I wonder if there was a deep reason why we had this?
let unix2dos s = String.concat "\r\n" (Str.split_delim (Str.regexp_string "\n") s)
I replaced it with what I think should be (nearly) equivalent:
let unix2dos s = String.concat "\r\n" (String.nsplit "\n" s)
Rich.