I was using the PHP Simple Dom library
which was working perfectly in PHP 5.6.x
. Now, we are migrating our system from this version to PHP 7.4.5
and unfortunately this library has badly paused us.
After hours of troubleshooting, I did figured this out that this expression is causing the reason. This is old standard PHP 5 based regular expression
which needs to be converted into the PHP 7.x
.
/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-:]+)(?:([!*^$]?=)["']?(.*?)["']?)?\])?([\/, ]+)/is
Can anyone please help on it?
Just got stuck in big hell of issue. Please help Thanks in advance