Using regexp to parse url, reducing need for hand coded validations.