Martin Hogg
Martin Hogg

Reputation: 41

Regex in Google Sheets full value + Value Splited

In SpreadSheet I have the following text:

Ann Nutr Metab. 2022 May 11:1-8. doi: 10.1

Need to extract the date (2022 May 11) and split it in columns (year/month/date)

In B1 y wrote the formula

=REGEXEXTRACT($A$1,"(((?:\d){4})(...\w)\s(\d*)).*?:")

But for some reason I have the date required in the formula cell plus the date splited (four colums) and I only need the columns for (year/month/date)

2022 May 11|2022|May|11|

How can I recode to have this? |2022|May|11| Thank you!

enter image description here

Upvotes: 1

Views: 65

Answers (1)

Mike Steelson
Mike Steelson

Reputation: 15318

Try

=split(regexextract(A1,".*(\d{4} \w+ \d+).*")," ")

enter image description here

Upvotes: 2

Related Questions