I\'m trying to create a regex to verify that a given string only has alpha characters a-z or A-Z. The string can be up to 25 letters long. (I\'m not sure if regex can check
///
/// Checks if string contains only letters a-z and A-Z and should not be more than 25 characters in length
///
/// String to be matched
/// True if matches, false otherwise
public static bool IsValidString(string value)
{
string pattern = @"^[a-zA-Z]{1,25}$";
return Regex.IsMatch(value, pattern);
}