Url pattern matching

@rcrichton please test review 
I think this  was left here my mistake.