preg_match php
Reg Ex:'/^Argument (\d+) passed to (?:(?:(\w+)\\)?(\w+)::)?(\w+)\(\) must be an instance of (?:(\w+)\\)?(\w+), (\w+) given/'
Får den her noget underlige fejl:
Warning: preg_match(): Compilation failed: missing ) at offset 111 in test.php on line 15
Offset 111 er lige inden det her: +)\\)?(\w+), (\w+) given/
Teksten der søges i er:
Argument 1 passed to Dav\Test::__construct() must be an instance of Dav\string, string given
Virker problemfrit på:
http://regex.larsolavtorvik.com/
Hele min linie:
preg_match('/^Argument (\d+) passed to (?:(?:(\w+)\\)?(\w+)::)?(\w+)\(\) must be an instance of (?:(\w+)\\)?(\w+), (\w+) given/', $errorMessage, $errorMatches);