分别获取一个字符串中的字母和数字
string str20 = "ABC123"; string strSplit1=string.Empty; string strSplit2=string.Empty; //取出字符串中所有的数字 strSplit1 = Regex.Replace(str20,"[a-z]","",RegexOptions.IgnoreCase); //取出字符串中所有的英文字母 strSplit2 = Regex.Replace(str20,"[0-9]","",RegexOptions.IgnoreCase);
这个方法挺实用的,解决了很多动态生成序列号一系列问题;
生命不息,奋斗不止!只要相信,只要坚持,只要你真的是用生命在热爱,那一定是天赋使命使然,那就是一个人该坚持和努力的东西,无论梦想是什么,无论路有多曲折多遥远,只要是灵魂深处的热爱,就会一直坚持到走上属于自己的舞台!