use strict; use warnings; print "",join(" ",map{/^(\w+).*?(B-NP|I-NP)?$/; $a.="NP$1\n"if$2;$1}),"\n$a"; __DATA__ how B-NP are you I-NP really