Reworked validate_ip and ip2num to use Resolv::IPv4::Regex.