Change structure of unsafe_to_safe_regexpr