0

I'm trying to implement a non-greedy group in my function.

(?!(\.){2,})(\s|\S)*((?:INDEPENDENT\s*AUDITORS'\s*REPORT\s*)+?|(?:Management's\s*Report)+?|(?:PART\s*III)+?))

The problem right now is that if the text has, for example, Independent Auditors' Report and Part III at the end of the text, it'll match up to the very end of the text. However, I'd like it so that it stops at the first instance in the group.

The +? is my attempt at a non-greedy match. How do I solve this?

Thanks!

PurplePros
  • 11
  • 1

0 Answers0