int prevInd = 0;
string lastWord = "";
private void richTextBox1_TextChanged(object sender, EventArgs e)
{
if (richTextBox1.Text.Length == 0)
return;
if (richTextBox1.Text[richTextBox1.Text.Length - 1] == ' ')
{
lastWord = richTextBox1.Text.Substring(prevInd, richTextBox1.Text.Length - prevInd);
prevInd += lastWord.Length;
MessageBox.Show(lastWord);
}
}