dizlexik/express-reverse — pull request #5 by pstadler (2014-09-03 15:18:44+00:00)
Title: Add support for routes with regular expressions

This pull requests adds support for advanced routes, such as:

```javascript
// Route:
'/test/:x1(foo|bar)/:x2/:x3([0-9]+)?'

// Good:
{ x1: 'foo', x2: 'bar' }
{ x1: 'foo', x2: 'bar', x3: 123 }

// Bad:
{ x1: 'xxx', x2: 'bar', x3: 123 } // Invalid value for "x1", should match "(foo|bar)":
{ x1: 'foo', x2: 'bar', x3: 'ab' } // Invalid value for "x3", should match "([0-9]+)"
```

Tests included, with all crucial things covered. :beers: