I have text that looks like the following:
my_string = "a + (foo(b)*foo(c))
And I am trying to remove the parentheses that start with C. So the desired output would look like
"a + (b*c)
I found the following to find all patterns inside the string, but not to remove in place.
re.findall(r'foo\((.*?)\)', my_string)