更新时间:2022-11-12 09:58:31
您的解决方案是说对了一半。你看这场比赛是为其他字符。你想说的是像哎!我不想看到这个字符在整个字符串。
Your solution is half right. The match you see is for the other characters. What you want to say is something like "hey! I do not want to see this character in the entire string".
在你这种情况下:
Regex.IsMatch("103","^[^0]*$")