in reply to remove lines that do not match search pattern

From "perldoc perlop":

Binary "!~" is just like "=~" except the return value is negated in th +e logical sense.
So - use your pattern, and negate the match.

Try this pattern:

!~/(:?[\da-f]{2}:){5}[\da-f]{2}/
or better, Regexp::Common::net provides built-in regex matching for mac addresses.

        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

    Thank you for your suggestions and direction on the regex pattern. I was able to get something working, and the ability to parse through my files.