joeldev/JLRoutes — pull request #19 by asmallteapot (2013-06-01 00:51:30+00:00)
Title: Add support for wildcard route matching

This commit add support for matching an arbitrary number of path components at the end of the routed URL, by adding an asterisk as the last path component in the route string.

For example, the following route would be triggerd for any URL that started with `/wildcard/`, but would be rejected by the handler if the next component wasn't `joker`.

```objc
[JLRoutes addRoute:@"/wildcard/*" handler:^BOOL(NSDictionary *parameters) {
NSArray *pathComponents = parameters[kJLRouteWildcardComponentsKey];
if ([pathComponents length] > 0 && [pathComponents[0] isEqualToString:@"joker"]) {
// the route matched; do stuff
return YES;
}

// not interested unless the joker's in it
return NO;
}];
```