so here is a demo with crap test data...
[{"id":"83746a428adcbc17","type":"inject","z":"7eecf5f1d763605a","name":"dummy data","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":" The Contract start date blah blah asd sdlfkj s;doafk ja;sldkf j asd asdodijapsiodfj aspidj;asld 2022. The Contract end date blah blah asd sdlfkj s;doafk ja;sldkf j asd asdodijapsiodfj aspidj;asld 2022. The contract end date blah blah asd sdlfkj s;doafk ja;sldkf j asd asdodijapsiodfj aspidj;asld 2022. The Contract end date on a single line 2021. The contract end date blah blah 2022.","payloadType":"str","x":998,"y":384,"wires":[["056008d289d9ada1"]]},{"id":"056008d289d9ada1","type":"function","z":"7eecf5f1d763605a","name":"get paragraph \"The Contract end date\"","func":"const regex = /The Contract end date.*?\\./gms;\nlet m;\n\nwhile ((m = regex.exec(msg.payload)) !== null) {\n // This is necessary to avoid infinite loops with zero-width matches\n if (m.index === regex.lastIndex) {\n regex.lastIndex++;\n }\n\n // The result can be accessed through the `m`-variable.\n m.forEach((match, groupIndex) => {\n node.send({payload: match});\n });\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1070,"y":432,"wires":[["52182669c4a415b7"]]},{"id":"52182669c4a415b7","type":"debug","z":"7eecf5f1d763605a","name":"payload","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1164,"y":480,"wires":[]}]