Python Get Substring From String Regex Javascript Replacechild