I'm working on extracting specif string set after matching a pattern but results are not as expected. Instead of first occurrence starting from top of the text file the function picks very last occurrence.
Function:
[\n\r].*Sent:\s*([^\n\r]*)
Sample text:
From: Y Sent: Monday, November 6, 2018 6:38 AM To: X
BLA BLA
Thank you,
From: X Sent: Monday, November 5, 2018 8:38 AM To: Y
Hi Y BLA
Thanks,
Expected results:
Monday, November 6, 2018 6:38 AM
Curently returns:
Monday, November 5, 2018 8:38 AM