title: check hostnames and IP addresses (v4 and v6) using a single python regex?
body: <p>Is it possible to check a string with a single regex and validate it if matches valid IPv4 or IPv6 address or even a hostname with no special characters but dot (.)?</p>
  
  <p>I have separate regex for IPv4 and IPv6 but how do I combine them to do the work described above?</p>
  
  <p>Thanks in advance,</p>
  
  <p>Dan</p>