Support functions in Regex.replace/4