I know that you saw many questions like mine, but I hope mine is a little bit different. I'm making a translator and I wanted to split a text into sentences but when I've written this code:
public static string[] GetSentences(string Text)
{
if (Text.Contains(". ") || Text.Contains("? ") || Text.Contains("! "))
return Text.Split(new string[] { ". ", "? ", "! " }, StringSplitOptions.RemoveEmptyEntries);
else
return new string[0];
}
It removed the ".", "?", "!". I want to keep them how can I do it.
NOTE: I want to split by ". " dot and a space, "? " question mark and space...