Regular expression engines which are built into various languages usually have differences even if the general syntax is the same. PHP happens have multiple regular expression engines built in (POSIX and PCRE), so depending on which regular expression functions you are using will depend on how well they'll convert over.
If you mainly used preg_*
functions then those should mainly convert over without an issue, however I believe the python implementation of regular expressions lacks some more advanced features which are included in the PHP implementation.
You can read about PHP's regular expressions here and Python's regular expressions here and figure out some more specific stuff.
Good question, but difficult to give a complete answer to as there are a lot of variables.