Strip text and remove comma from last value in list line