用正则表达式,这个很简单的
Console.WriteLine("请输入");
string url = Console.ReadLine();
bool b = Regex.IsMatch(url, "^[a-zA-Z0-9]+@sina\.com$"); Console.WriteLine(b);
转载于:https://www.cnblogs.com/haimingkaifa/p/5687767.html
用正则表达式,这个很简单的
Console.WriteLine("请输入");
string url = Console.ReadLine();
bool b = Regex.IsMatch(url, "^[a-zA-Z0-9]+@sina\.com$"); Console.WriteLine(b);
转载于:https://www.cnblogs.com/haimingkaifa/p/5687767.html