I want to sort an array to keep the years in ascending order and continue in the right sequence.
It is for a simple ruby application.
Suppose my array is a = [ "Influenza - 2015", "Influenza - 2019", "Influenza - 2016", "Hepatite B", "Influenza - 2018", "Influenza - 2017"]
I want my output to be:
Hepatite B
Influenza - 2019
Influenza - 2018
Influenza - 2017
Influenza - 2016
Influenza - 2015