Maya Python: Why doesn't my regex expression work in Maya?

Ah sorry. Yes, I forgot to mention I’m using Maya 2020 and that, that’s probably the cause.