in reply to remove lines that do not match search pattern
So - use your pattern, and negate the match.Binary "!~" is just like "=~" except the return value is negated in th +e logical sense.
Try this pattern:
or better, Regexp::Common::net provides built-in regex matching for mac addresses.!~/(:?[\da-f]{2}:){5}[\da-f]{2}/
Clarity: it's like that one thing that is not the other thing, except for when it is.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: remove lines that do not match search pattern
by jasonwolf (Sexton) on Aug 06, 2015 at 18:00 UTC |