Using more than one flag in python re.findall
Is there a way to use more than one flag ?
It wasn't mentioned, but you can use inline (?...)
modifiers as well.
x = re.findall(r'(?si)CAT.+?END', 'Cat \n eND')
You can't put the flags within a tuple. Use the pipe character (OR operand) within your flags:
x = re.findall(r'CAT.+?END','Cat \n eND',flags=re.I | re.DOTALL)
Yes, but you have to OR them together:
x = re.findall(pattern=r'CAT.+?END', string='Cat \n eND', flags=re.I | re.DOTALL)