match returns a list of indexes