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