Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要匹配所有正非十进制整数的正则表达式,范围仅从 0 到 999999。它不接受任何小数、字母或任何特殊字符,范围应在 0 到 999999 之间。
这应该这样做。
Regex.IsMatch("999999","^[0-9]{0,6}$");//return true