how to replace just at the beginning and at the end of string pèyhton code example
Example: find and replace subword in word python regex
result = re.sub(r"Pulp Fiction", "Forrest Gump", text)
result = re.sub(r"Pulp Fiction", "Forrest Gump", text)