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.
我需要为银行帐号创建一个正则表达式。据我所知:
Regex(@"^([0-9]{26})$");
这只接受 26 个数字。我希望它接受 26 个数字和无限数量的空格,以便用户可以随意格式化这个字符串。我该怎么做?
试试这个正则表达式
^\s*([0-9]\s*){26}$