using System.Text.RegularExpressions;
public static void Main()
string text = @"""Hurry up, boy!"" shouted Uncle Vernon from the kitchen. ""What are you
doing, checking for letter bombs?"" He chuckled at his own joke.
Harry went back to the kitchen, still staring at his letter. He handed
Uncle Vernon the bill and the postcard, sat down, and slowly began to
open the yellow envelope.
Uncle Vernon ripped open the bill, snorted in disgust, and flipped over
""Marge's ill,"" he informed Aunt Petunia. ""Ate a funny whelk. --.""
""Dad!"" said Dudley suddenly. ""Dad, Harry's got something!""
Harry was on the point of unfolding his letter, which was written on the
same heavy parchment as the envelope, when it was jerked sharply out of
his hand by Uncle Vernon.
""That's mine!"" said Harry, trying to snatch it back.
""Who'd be writing to you?"" sneered Uncle Vernon, shaking the letter open
with one hand and glancing at it. His face went from red to green faster
than a set of traffic lights. And it didn't stop there. Within seconds
it was the grayish white of old porridge.";
bool textMaSmysl = false;
if (!string.IsNullOrEmpty(text)) {
Console.WriteLine("Text dava smysl - ".PadRight(padding) + (textMaSmysl == true));
int delkaTextu = text.Length;
Console.WriteLine("Delka text je spravna - ".PadRight(padding) + (delkaTextu == 1001));
for (int i = 0; i < 20; i++) {
Console.WriteLine("Oddelovac ma 20 pomlcek - ".PadRight(padding) + (oddelovac == "--------------------"));
bool jeStejne = string.Equals(jmeno1, jmeno2, StringComparison.OrdinalIgnoreCase);
Console.WriteLine("Obe promenne obsahuji stejne jmeno - ".PadRight(padding) + jeStejne);
bool piseSeOMarge = text.Contains("Marge");
Console.WriteLine("V textu se zminuje Harryho 'teticka' - ".PadRight(padding) + (piseSeOMarge == true));
bool jeSpravneUkoncen = text.EndsWith(".");
Console.WriteLine("Text je spravne ukoncen interpunkci - ".PadRight(padding) + (jeSpravneUkoncen == true));
string[] values = { blabol1, blabol2, blabol3};
Console.WriteLine("Prvni v abecede je blabol3 - ".PadRight(padding) + (prvni == blabol3));
string[] sentences = Regex.Split(text, @"(?<=[\.!\?])\s+");
for (int i = 0; i < sentences.Length; i++) {
if(sentences[i].Contains("!")) {
veta = sentences[i].Substring(0, text.IndexOf("!")).Trim('"');
Console.WriteLine("Prvni rozkazovaci veta je 'Hurry up, boy' - ".PadRight(padding) + (veta == "Hurry up, boy"));
string[] separators = new string[] {" and ", "And "};
string[] useky = text.Split(separators, StringSplitOptions.None);
int pocetAnd = useky.Length-1;
Console.WriteLine("Text obsahuje slovo 'and' celkem 5x' - ".PadRight(padding) + (pocetAnd == 5));