Added ungreedy flag for URL matching
merged in ungreedy fix