79710247

Date: 2025-07-22 09:57:29
Score: 1
Natty:
Report link

If the data set is like : "Name of wine", "Year", "Type" then:

library(stringr)
vino<-mutate(vino, name = str_extract(vino$title, ".*?(?=\\b\\d{4}\\b)"))
vino<-mutate(vino, year = str_extract(vino$title, "\\b\\d{4}\\b"))
vino<-mutate(vino, type = str_replace_all(str_extract(vino$title, "(?<=\\b\\d{4}\\b).*"), "\\s*\\([^()]*(\\([^()]*\\)[^()]*)*\\)", ""))

After the type probably there is an info about the manufacturing area???

To extract also this, you could use extraction methods between parentheses...

Reasons:
  • Blacklisted phrase (1): ???
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Antreas Stefopoulos