in reply to Quick Regex trouble

I would just add another test:

use strict; use warnings; my $var = "use neighbor 2001:504:0:4::6181:1"; ($var !~ /use neighbor/) and ($var =~/neighbor[[:alpha:]-]* ([[:alnum: +]\.-:]+)/) and do{ print $1; };

especially as I am not as literate with (negative)? look(back|ahead|around) assertions.