Finding all the instances of a substring in a given string [1]