azicchetti/jquerymobile-router — Issue #26: multiple routes matched
Author: stephenhandley
Created: 2012-02-29 21:03:01+00:00
State: open

I'm seeing multiple routes matched when they share a common prefix. Seems the first defined route should take precedence:

```javascript
var router=new $.mobile.Router([
{"#blahs_year\\?year=(\\d{4})": {handler: Controller.blahs_year, events: "bs,h"}},
{"#blahs(?:\\?tab=(.*))?": {handler: Controller.blahs, events: "bs,h" }}
], {}, {
defaultHandler: function(type, ui, page) {
console.log("Unmatched route (" + type + ", " + ui + ", " + page + ")");
},
defaultHandlerEvents: 'bs,h'
});
```
I'm getting around it by changing the route hash, but I think it would be better if only a single route was matched.