Python Regex Replace Substring Javascript