I want to extract numbers and only numbers from a string.
Say I have a string like this: "VW Golf 2009". I can use the regex [0-9]+ to extract the 2009 part.
The problem arises when I have a string like this: "BMW 2013 i8". I want to extract the 2013 part, but not the 8 part.
Basically, I want to extract the "year" part of any string similar to the following:
BMW 2013 i8
VW Golf 2009
1938 CarCompany, inc. <insert car name here>
My 128th birthday is in the year 2014.
aui895h 2013 5qnui 89hth658h uab2 52h5h528h
etc.