in reply to Frustration With regex

Better change order of those lines:

if ($line =~ m/:.+\@.+\s([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3 +})/) { Xchat::print("test2",,$servertabname); my $ip = $1;

to

if ($line =~ m/:.+\@.+\s([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3 +})/) { my $ip = $1; Xchat::print("test2",,$servertabname);

If there is any regexp inside Xchat::print() method, it will reset $1. Maybe this is your case?

BTW. [0-9] can be written as \d