Php Find And Replace Regex Javascript Url Constructor In Python