string str = project.Variables["Text"].Value;
{
string[] s = Regex.Split(str, @"(?<=[\u2026\.\!\?]+\ )");
for (int i = 0; i < s.Length; i++)
{
if (s[i].Length > 1)
s[i] = s[i].Substring(0, 1).ToUpper() + s[i].Substring(1, s[i].Length - 1);
else s[i] = s[i].ToUpper();
}
return string.Join("", s);
}