in reply to Regex to remove data
Also, don’t overlook the obvious grep (or egrep) commands, if you have them on your system . . . You might not have to “write a program” to do this at all. Simply use the -v option to output all lines which don’t match the pattern.
In Section
Seekers of Perl Wisdom