http://www.perlmonks.org?node_id=1137298


in reply to Re^2: remove lines that do not match search pattern
in thread remove lines that do not match search pattern

OT

Filtering with Tcl/expect:

#!/usr/bin/expect while {[gets stdin line] >= 0} { if {[regexp {([[:xdigit:]]{2}:?){6}} $line]} { puts $line } }