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