ref: efd8060bae1542dd17556dcdc182b18b5bc35d36 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)) ;;