I'm trying to match my application uri to a set of routes, and for the default route I thought about allowing bb.com/home
or bb.com/
(empty) to be the allowed options on the first uri segment, and the same for the second. I'm not sure the way I am checking for empty values is the best :
#^/?(?P<controller>([.*]{0}|home))(?:/(?P<action>([.*]{0}|test)))?/?$#uD
Notice the [.*]{0}
Is there a better way to do it?