fork download
  1. line = 'months since 1850-01-01';
  2. res = regexp( line, '\s(\d+)-', 'tokens', 'once');
  3. year = str2double(res{1})
Success #stdin #stdout 0.46s 121792KB
stdin
Standard input is empty
stdout
year =  1850