in reply to Re: Regex substitute matches second match first?in thread Regex substitute matches second match first?
if (my ($ip) = $line =~ /\[(\d+\.\d+\.\d+\.\d+)\].*Relay access denie +d/) { print "$ip\n"; } [download]