String.replace with anonymous function with multiple matches

Thank you all :slight_smile: Regex.replace was the thing thing,