while () { if ($_ =~ /^(\d+\s+\[\d+\.\d+\.\d+\.\d+\]\s+[\d+\.\d+\.\d+\.\d+\])/) { print "Match=$1\n"; } }