def strip_between(a, b, string):
 p = ('%s.*?%s' % (a, b))
 p = re.compile(p, (re.DOTALL | re.I))
 return re.sub(p, '', string)

def strip_between ( a , b , string ) : p = ( '%s.*?%s' % ( a , b ) ) p = re . compile ( p , ( re . DOTALL | re . I ) ) return re . sub ( p , '' , string )
removes anything between string a and b inside the given string .