String search: Best scores for each user

Return the index of the first match of a substring in a string.