check if a string contains only alphabets in c# code example
Example 1: how to check that string has only alphabet in c#
Regex.IsMatch(input, @"^[a-zA-Z0-9]+$");
Example 2: how to check that string has only alphabet in c#
Regex.IsMatch(input, @"^[a-zA-Z]+$");