Смотреть видео: C# WinForms. Check if text matches C syntax (maybe regex?) - Stack Overflow