Help for this page

Select Code to Download


  1. or download this
    /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/
    
  2. or download this
    my $ip;
    if ($line =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/ &&
        $1 <= 255 && $2 <= 255 && $3 <= 255 && $4 <= 255) {
       $ip = "$1.$2.$3.$4";
    }
    
  3. or download this
    my ($ip, $subnet);
    if ($line =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/ &&
    ...
       $ip = "$1.$2.$3.$4";
       $subnet = 1 if $1 == 255;
    }