ref: bfe18062adfcad6af73f1b5ab204763df12649a6
dir: /utils.ml/
(* copied verbatim - must needs grok *)
let gsub re f str =
String.concat
""
(List.map
(function
| Str.Delim x -> f x
| Str.Text x -> x)
(Str.full_split re str))
;;