I find this a little bit unclear.

Maybe just say "pattern is a Python regular expression".