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