int str="121212,1212"
const string pattern = "^[0-9]*$"; Regex rx = new Regex(pattern); return rx.IsMatch(str); //bool类型