which one is appropriate to use for this task? Regex or URL class?