Javascript Apply Regex To String Python