Python Replace Regex String Javascript Program Code