fix normalize method to accept a regular expression url