regex - How to extract the year out of a string in R -


i have dataframe entries looking like: "wittmann 2014 100 hills dry riesling (rheinhessen)" , "hazlitt 1852 vineyards 2013 riesling (finger lakes)"

i need extract years (vintage of wine) out of string, years 2012 till 2015...

would nice if can me find right code/regex in r.

maybe regex work you:

/(\b201[2-5]\b)/g 

try online


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -