pub fn regex_replace( pattern: &str, replacement: &str, text: &str, flags: &str, ) -> Result<String, String>