How can I split a string with a string delimiter? [duplicate]

I have this string:

My name is Marco and I'm from Italy

I’d like to split it, with delimiter is Marco and, so I should get an array with

  • My name at [0] and
  • I'm from Italy at [1].

How can I do it with C#?

I tried with:

.Split("is Marco and")

But it wants only a single char.

7 Answers
7

Leave a Comment