string AAAAA= "ABCD1234";
//取出字符串中所有的英文字母
string strSplit1 = Regex.Replace(AAAAA, "[a-z]", "", RegexOptions.IgnoreCase);
//取出字符串中所有的数字
string strSplit2 = Regex.Replace(AAAAA, "[0-9]", "", RegexOptions.IgnoreCase);
获取的结果:strSplit1 =“1234“,strSplit2 =“ABCD”

相关文章:

  • 2021-09-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2022-01-13
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案