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.
你能帮我解决这个问题吗?
字符串的正则表达式看起来像DF-1234567或N/A在 ASP.Net 中。
DF-1234567
N/A
字符串包含DF-7 个或更多数字或N/A.
DF-
例如:
DF-1234567 DF-12345678 N/A
提前致谢。
试试这个:
在 Visual Studio 和ValidationExpression属性中使用RegularExpressionValidator :
(DF-(\d){7,})|NA