Regex Pattern including new line

Hi,
I am using regex pattern match to get data from screen scrape.
But I face an issue that the text that I want to extract have multiple lines which makes my regex not valid for the ‘Next Actions’ item that I want to get.

Link to my regex code:
https://regex101.com/r/z0iCTx/1

Hi,

Can you try the following pattern without MultiLine option.

Product ID\s*:\s*(?<PRODUCTID>\w+)\s*Quantity\s*:\s*(?<QUANTITY>\w+)\s*Item\s*:\s*(?<ITEM>\w+)[\s\S]*?NEXT\s*ACTIONS\s*(?<NEXTACTIONS>[\s\S]*?(?=\r?\n\r?\n|$))

Regards,

It works !
Thank you :slight_smile:

1 Like

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