collapse list re
returns list with all entries that do not match re removed
Source code:
set out {} foreach element $list { if {[regexp $re $element]} { lappend out $element } } return $out