What pattern error is occurring in preg_match_all?

37 views Asked by At

I have a piece of code (which I did not write) where a error is given when trying to call the pre_match_all function:

$pattern = "/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-:]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is";
    preg_match_all($pattern, trim($selector_string).' ', $matches, PREG_SET_ORDER);

As I'm not a novice programmer I really don't have any clue where to start, I tried some online checkers but I can't quite find the error/typo in the pattern.

0

There are 0 answers