I have string pattern like these:
Beginning through June 18, 2022 at Noon standard time\n
Jan 20, 2022
Beginning through April 26, 2022 at 12:01 a.m. standard time
I want to extract the data part presetnt after "through" and before "at" word using python regex.
June 18, 2022
Jan 20, 2022
April 26, 2022
I can extract for the long text using re group.
s ="Beginning through June 18, 2022 at Noon standard time"
re.search(r'(.*through)(.*) (at.*)', s).group(2)
However it will not work for
s ="June 18, 2022"
Can anyone help me on that.