def find_between(a, b, string):
 p = ('%s(.*?)%s' % (a, b))
 p = re.compile(p, (re.DOTALL | re.I))
 return [m for m in p.findall(string)]

def find_between ( a , b , string ) : p = ( '%s(.*?)%s' % ( a , b ) ) p = re . compile ( p , ( re . DOTALL | re . I ) ) return [ m for m in p . findall ( string ) ]
returns a list of substrings between a and b in the given string .