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.
In reply to Re: Quick Regex trouble
by hdb
in thread Quick Regex trouble
by jrvd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |