Regex over varying multiple lines between two anchors


I need some assistance with this regex.

I need to capture all text after “additional comments:” up until “< Last page visited.”

The number of lines can vary which is what I can’t figure out.

My attempt is below.

A sample of my text is below.


Can you try the following expression?

System.Text.RegularExpressions.Regex.Match(strData,"(?<=additional comments:)[\s\S]+(?=> Last page visited)").Value


Hey it worked!

Thank you :smiley:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.