phalcon/cphalcon — pull request #977 by sjinks (2013-08-02 08:17:32+00:00)
Title: Regular Expression Optimization for Phalcon\Mvc\Router

This patch mainly adds [possessive quantifiers](http://www.regular-expressions.info/possessive.html) to the patterns generated by Phalcon\Mvc\Route and Phalcon\Mvc\Router\Route

Match `/this-will-not-match!/` against `#^/([a-zA-Z0-9_-]++)/?+#` will be almost two times faster than match against `#^/([a-zA-Z0-9_-]+)/?$#` or `#^/([a-zA-Z0-9_-]+)[/]{0,1}$#`.