The regex itself looks fine, it matches checks there are no "special" characters at the start of a new line, and for a subset of those (which are allowed) that they are not followed by any tabs, spaces, null bytes or other wonky things. So far so good. When using it the lexer coughs up an Exception and PHP sends out a Warning:
I used a unique delimiter in case it was a loose non-escaped forward slash or something obvious I missed. Left the double quotes in place around the regex string...Warning: preg_match() [function.preg-match]: No ending delimiter '£' found in Yaml\Lexer.php on line 222
Code: Select all
"£^([^\0 \t\r\n\x85\-?:,\[\]{}#&*!|>'\"%@]|([\-?:][^\0 \t\r\n\x85]))£"