Find the last position of a substring in the parent string