On Wed, Apr 12, 2017 at 2:30 PM, Rob Biedenharn <rob.biedenharn / gmail.com>
wrote:

>
> Why not leverage the IPAddr class?
>
> for your "partial IP strings" case, you might have to do something
> different.
>
> -Rob
>
> It's the partial string bit that got me doing this on my own. I need to be
able to verify that the first three octets are vaild IP numbers and there
are three of them. Another way to do this would be to construct the full ip
and then use ipaddr, but I'm looking to validate the input before using it.
The full ips are the output.

Leam
(supressed text/html)
Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>