php-simple-html-dom-parser icon indicating copy to clipboard operation
php-simple-html-dom-parser copied to clipboard

Invalid character class

Open DrRoach opened this issue 5 years ago • 0 comments

This pattern:

([\w-:*])(?:#([\w-]+)|.([\w-]+))?(?:[@?(!?[\w-:]+)(?:([!^$]?=)["']?(.*?)["']?)?])?([/, ]+) Treats the - in both the character groups as ranges rather than characters to match meaning that the regex is looking for everything including and between \w-: rather than the three characters by themselves. The same issue is repeated near the middle of the regex.

See pr #70

DrRoach avatar Apr 29 '19 11:04 DrRoach