How could I read a HTML document and get text between 2 points from it??

start point looks like this = <h2>Want to know more</h2>
end point looks like this = <h2>What is this course about</h2>

I want the text (html) extracted and put into a database.

Hope someone can help,

Thanks