第1个回答 推荐于2016-10-25
string aa=" abcd6789@21cn.com";
方法1:aa.IndexOf ("b",1,);
方法2:有需要用正则表达式
string emailflag = "@";
if(Regex.Matches(aa,emailflag).Count)==0本回答被提问者采纳
第2个回答 推荐于2018-03-10
static int Count(string str, string constr)
{
return System.Text.RegularExpressions.Regex.Matches(str, constr).Count;
}本回答被网友采纳