Escaping regular expression to work with php-7.*
Due to the breaking change the regular expressions don't work anymore. Also, since PHP 7.1 it is possible to interpret negative offset.
Check: https://stackoverflow.com/questions/24764212/preg-match-compilation-failed-invalid-range-in-character-class-at-offset https://stackoverflow.com/questions/47214416/dont-parse-simple-html-dom-on-php-7-1 https://sourceforge.net/p/simplehtmldom/bugs/161/
This commit fixes those issues. [Tested with php-7.4]
I came across this problem too and it seems all the changes @sptutusukanta applied are correct. These changes make the package compatible with PHP 7.*. When is this pull request going to be merged to master and make a release?
Hello @SaliBhdr, it seems like this repo is no more maintained by anyone & abandoned. So, I already found another package which is still maintained and is quite a drop-in replacement of this package.
Check this out: https://github.com/Kub-AT/php-simple-html-dom-parser You may install it with:
composer require kub-at/php-simple-html-dom-parser