title: Regex for URL with port validation
body: <p>I need to validate a url like those of web servers.
  Something like <a href="http://localhost:8080/xyz" rel="nofollow">http://localhost:8080/xyz</a></p>
  
  <p>How do we do that using regex. Sorry, new to regex.</p>