Warning: preg_match(): Compilation failed: unrecognized character after (? or (?-
问题 I have a code written by a previous programmer, a regex preg_match that is throwing a compilation error: $regex_t = "/" . $op . "(?\\>[^" . $op . $cl . "]+)*" . $cl . "/s"; preg_match($regex_t, $text, $inner); The warning that I receive is: Warning: preg_match(): Compilation failed: unrecognized character after (? or (?- at offset 4 Also, I want to mention that at var_dump($regex_t) the value is: string '/\{(?\>[^\{\}]+)*\}/s' (length=21) 回答1: For a strange reason, the programmer has escaped