This function takes in a list of matches (in an ArrayBuffer for constant append and random access) and returns the match that starts earliest in the data.
This function takes in a list of matches (in an ArrayBuffer for constant append and random access) and returns the match that starts earliest in the data. If multiple matches start at the same point in the data, the match with the longer delimiter length is used as a tie breaker