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


in reply to Regex word options

Put this in music.pl and then go perl -n music.pl < data_file 2>/dev/null

chomp; if ( /(.*?)\s?(Transcribed|Arranged)?,\s+For\s+([^(,]+),?(.*)/) { print "$1$4\n"; print STDERR "# Instrument: $3 T/A:$2\n"; }
This produces the output requested given the sample input you provided.