月麒麟網誌
到這裡的朋友,上方的廣告有適合您的,不仿點進看一下喔^_^ 本站的資料,有些是自己的心得記錄,有些是準備資料時搜集來做筆記的,若有侵犯到您的權益,請來信通知刪除喔。
2015年8月26日 星期三
[C#] 移除字串中非數字的字元,只保留數字。
using System.Text.RegularExpressions;
string testStr;
testStr = Regex.Replace(testStr, "[^0-9]", "");
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言