常用正则表达式

1.提取字符串中所有数字字符

1 // convert text to int ignoring all non-numerical characters
2 public string str;
3 str = (new Regex("[^0-9]")).Replace(str, "");

 

posted @ 2018-01-06 16:03  折腾一哥  阅读(163)  评论(0编辑  收藏  举报