Extract content between pieces of text

Hi

I was wondering if you could help.
I need to get the content, including the formatting and images between two pieces of text, save it as HTML and display the HTML in a text box similar to what I’m typing this into at the moment, and save it in a database

So for example

  1. Background

Some text and images
More text

  1. Methodology

More text

  1. Objectives

More text

So I need to get the content between “1.Background” and “2. Methodology”, and then between “2.Methodology” and “3. Objectives”. I’ve tried getting it to work using the samples provided on the forum, but haven’t got it right thus far.
I thought about marking the text to start and end with, with bookmarks, but I still don’t know how to get the content between the bookmarks.
If I didn’t have to get the formatting I could have done it easily enough with IndexOf, but life is never simple

Any help would be appreciated

Hi

Thanks for your request. I think you can try using the same technique as describe here to achieve what you need:
https://forum.aspose.com/t/94231
Hope this helps.
Best regards.

That seems to have worked, thank you very much.