Javascript Regex String Replace Method Python