I need to use an asp:RegularExpressionValidator control in my asp.net site and I want to restrict the characters to digits and semi-colon only.
So it needs to be able to take any amount of digits and ;
Valid values:
123
123;456
123;456;789;....
What is the regex for that?
^\d+(?:;\d+)*;?$? input like ";;5" will be invalid (caught by^[\d;]+$).^((?:[0-9]+[;])+)$