Url pattern matching

@rcrichton please test review 
aah indeed it was. Well spotted. Will remove