in reply to Extracting a substring from HTML

Check out this node:

Efficiently Extracting a Range of Lines

Not exactly HTML specific but definitely worth a looksie for extracting text that lies between two known 'markers'.