Added support for regular expressions in the routing logic