to replace but the last occurrence of string in a text,"re.sub(' and (?=.* and )', ', ', str)"