Are you doing something like this ?
VB Code:
  1. Dim s As String = "Firstx0D0ASecondx0D0AThirdx0D0A"
  2. MessageBox.Show(s.Replace("x0D0A", "x0A"))
forget about IndexOf now .