I have a string which may contain \"title1\" twice in it.
e.g.
server/api/shows?title1=its always sunny in philadelphia&title1=breaking ba
I found this link immediately on a google search.
C# - indexOf the nth occurrence of a string?
Get the IndexOf the first occurrence of the string.
Use the returned IndexOf's startIndex +1 for the starting position of the second IndexOf.
Substring it into two strings at the appropriate index of the "1" character.
Concat it back together with the "2" character.