I need to match the regex that matches the sentence with following pattern:
1st part is occurrence of word/s.(eg: passed, died)
2nd part is the date in that sentence.
3rd part is, this should match only before the delimiter/dot/full stop.
Example:
Worth Scattergood (Dee) Lea passed on Thursday, July 28, 2022, Worth Scattergood (Dee) Lea passed away unexpectedly at age 88 with her three daughters at her side. Dee was born on April 26, 1934, in Radnor, Pennsylvania.
Here i need result of: July 28, 2022
But this should not match or find any result in following sentence:
Worth Scattergood (Dee) Lea passed on Thursday. Dee was born on April 26, 1934, in Radnor, Pennsylvania.
I tried with following expression but it is wrong as it match upto second sentence:
(passed|died)(.*?)(\w+)\d{1,2},?\s?\d{4}