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