This is always a fun programming problem. There are three approaches I can think of. I am sure there are many more. I suggest you do what you feel comfortable with or maybe get some ideas from what I suggest:
1. Using awk
I can't even come up with an example for you. You'll have to use a BEGIN an END section, probably with FS="<text you are looking for>". For RS, I am not sure what to use if they are separated by double blank lines. I am sure there is a way to specify this but I don't know what that would be. You may even have to do a sed first to replace some stuff to get awk to work. Eitherway, it probably isn't going to be pretty.
2. Using Perl
Text parsing is definitely where perl shines. There is a range regular expession you can use that will probably do what you want in less then 5 lines of code. You may even be able to do it in 1. I would check with perlmonks.com for advice on the complete script but the regular experssion would be similar to (from memory, syntax is probably wrong):
/FGH/ .. /\n\n
This will find the block between and including FGH and 2 blank lines.
3. c
You could alway write a c program to pump the data into an array and parse it that way.
#2 would be my choice, but I thought you would like to know more options incase you don't know perl (if you don't, you should check it out, it is pretty sweet)
TioTony