Although I bet you could improve on that further... reducing the .* to something more specific.while( <FILE> ) { push @file2, $1 if m/^confederation-as-router:\W+\d\W+\d+\W(?!.*cr\d ++)$/; }
Update: I missed the negation in that. oops. I've added it to my regex. Thanks runrig and Tye for pointing that out to me. (For those who missed it, I forgot the ?!)
In reply to RE: (tye)Re: How do you match
by Adam
in thread How do you match
by Limo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |