Finding the starting position of the substring