Reputation: 83
I have a Google Sheets spreadsheet that contains 1000+ rows.
In Column B, I have a text string which contains a date.
Example:
Written by <!-- -->John Doe<!-- --> on <!-- -->Wed Nov 17 2021<!-- -->.
How can I extract Nov 17 2021 from this string?
If it helps: The date always appears between the 2nd to last ">" and the last "<".
I've already checked this article and this article, but neither seem to apply to my situation because the date in my string is formatted differently.
Upvotes: 1
Views: 562
Reputation: 15308
Try
=regexextract(A1,"\w{3} \d{2} \d{4}")*1
then define the format you wish
for a complete column (as B)
=arrayformula(iferror(regexextract(B1:B,"\w{3} \d{2} \d{4}")*1))
Upvotes: 1