in reply to extraction of sequences

If the above comments don't get you what you want, you might check out http://www.bioperl.org and especially the Bio::Seq realted modules. These are designed to do pretty much exactly what you want to do, i.e. munging one formatted output into another. Hope this helps

Just a something something...