I have a text field which I need to validate using a regex. My requirement is as follow:
www.un.org/Depts/DGACM/index_french.htm
1234ABCDEFG
or123-ABCDEFG
(例示)
规则:
- The whole string is maximum 25 characters
- The first four characters (CCCC) must be alphanumeric
- CCCC is 4 characters exactly and can be digits or number
- CCCC can have a dash sign as 4th character
- NNNNNNNNNNNN can be up to 21 characters and only numbers
例如,AAAAAA
<1234>
我的研究说明如下:
- I will need to match numerics first
- I will need the
+
char to specify to match this pattern X times - I will need to match letters after that for 8-9 spaces
这里有一个令人 wonder切的职位:
我的目标是将这一区域评价模式应用到“WinForms”的文箱Mask。