Fix regexp for PHP 5.2.1 and earlier compatibility

PHP 5.2.1 and earlier use ?P<name> instead of ?<name> in regexps. Old format works in all