ref: 689862826175d1b783f98018c1484c78396a33aa
dir: /utils.ml/
exception Syntax_error of string exception Runtime_error of string (* 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)) ;;