Regex Pattern including new line

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:


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|$))


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.