in reply to I need help with some logic

By "blocks of text" I thought about the pieces between <P> and <br> tags. Still not sure what you mean by titles, though...

If your HTML uses tables, it would make this a lot easier.

Good luck.

Russ
Brainbench 'Most Valuable Professional' for Perl