Added functions to replace directly from a Regex.