How can I substitute all occurrence of a certain string NOT after a specific character in Python?
For example, I want to substitute all occurrence of abc NO
abc
result = re.sub("(?
(? asserts that what precedes is not x
x
def
Reference