询问者
正则表达式选择题答案选项匹配

问题
全部回复
-
你好
{1,4}代表重复1到4次,你改成重复一次试试呢 ^[A-D]{1}$
这是示例:http://msdn.microsoft.com/zh-cn/library/ae5bf541(v=vs.90).aspx
Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已编辑 Barry WangModerator 2014年9月11日 10:38
-
你好,
如果是这样的话,你用下这个:
^A?B?C?D?$
Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 liufan_312 2014年9月15日 1:53
- 取消答案标记 ThankfulHeartModerator 2014年9月15日 5:15
-
Regex reg = new Regex(@"^(?=[A-D]{1,4}$)(?!.*(.)(.*\1)+)"); Console.WriteLine(reg.Match("ABCA").Success);
ASP.NET Forum
Other Discussion Forums
FreeRice Donate
Issues to report
Free Tech Books Search and Download
- 已编辑 ThankfulHeartModerator 2014年9月14日 12:13
- 已建议为答案 ThankfulHeartModerator 2014年9月15日 6:04
-
这个写什么不行
哪个不行?我的应该可以把?请您确认一下,谢谢。
ASP.NET Forum
Other Discussion Forums
FreeRice Donate
Issues to report
Free Tech Books Search and Download