In the other code posted here, I see that you're reading the file line by line. You can't match more than one line if you're reading/processing each line separately. You will need to either set a flag or collect all information up to a point where you know that the current set of data has ended (for example because you hit the start of the next gene or EOF), and then process the accumulated data.
In reply to Re^5: Read, match string and print
by Corion
in thread Read, match string and print
by sophix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |