Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php-simple-html-dom-parser for PHP7.3 + #75

Open
WebSergeevDima opened this issue Oct 25, 2019 · 1 comment
Open

php-simple-html-dom-parser for PHP7.3 + #75

WebSergeevDima opened this issue Oct 25, 2019 · 1 comment

Comments

@WebSergeevDima
Copy link

If you use php 7.3 and higher, then use my edits. Otherwise, you will get errors due to migration to PCRE2 in new versions of PHP.

For example: Warning: preg_match_all (): Compilation failed: invalid range in character class at offset 4

New file

@ldim87
Copy link

ldim87 commented Nov 22, 2019

Yep, it's the new strict PCRE2 caused by regex

\w-:

which should be

\w\-:

Here is the simple snippet used in php.net

preg_match('/[\w-.]+/', ''); // this will not work in PHP7.3
preg_match('/[\w\-.]+/', ''); // the hyphen need to be escaped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants