getvector function

getvector extracts a vector of numbers from a line of characters