Capture text using Regex that contain line returns with Positive lookbehind and Positive lookahead

17 Views Asked by At

The following accomplishes capturing all the text between Start and Finish (?<=Start:)(.*?(?=Finish))

Start:This id line 1This id line 2This id line 3Finish

However, I need to capture the following text between Start and Finish that contains line returns. What parameter do I need to add to (?<=Start:)(.*?(?=Finish)) so I can accomplish this. It also needs to be in the same format for later use. Is this the best method.

As always... thanks

Start:

This id line 1.

This id line 2.

This id line 1.

Finish

I tried (?<=Start:)([^.]+(?=Finish)) but the period at the end of each line caused an issue

0

There are 0 best solutions below