Generating RegExes for URLs