#!/usr/local/bin/perl -w # patterntest.pl while (<>) { chomp; if ( /^PH.*?[(H\-000)(IF\-000)]$/ ) { print "{$`}[$&]{$'}\n"; } }