I have two regular expressions that validate the values entered.
One that allows any length of Alpha-Numeric value:
@'^\s*(?<ALPHA>[A-Z0-9]+)\s*'
And the other only allows numerical values:
@'^\s*(?<NUM>[0-9]{10})'
How can I get a numerical string of the length of 11 not to be catched by the NUM regex.
I think what you’re trying to say is that you don’t want to allow any more than 10 digits. So, just add a
$at the end to specify the end of the regex.Example:
@'^\s*(?[0-9]{10})$'Here’s my original answer, but I think I read you too exact.
That reads ‘while ahead is not, start, 11 digits, end’