Find the index of the last match
the xml string
the pattern
the start index
the index of the last match
Find the index of the last match