0

Is there a way to set a delimiter to a Python 3.x regex pattern so that you can set the flags to it, without having to use re.compile?

Here is a code example:

pattern = r'%[aeiou]{1}%mi'
return re.findall(pattern, string)

The mi stands for multiline and case insensitive and % is the delimiter in my case.

I remember python 2.5 having this option of setting the delimiters of the pattern string as I used them once.

Alexandru Antochi
  • 1,295
  • 3
  • 18
  • 42

0 Answers0