I have written this code, but it does not work. Can someone point out the issue?
sub match_ip() { my $ip = \"The IP address is 216.108.225.236:60099\"; i
Try this:
$variablename=~m/((((0-9)|((1-9)(0-9))|(1([0-9]){2})|(2[0-4][0-9])|(2[5][0-5]))\.){3})((0-9)|((1-9)(0-9))|(1([0-9]){2})|(2[0-4][0-9])|(25[0-5]))/)