I am very new to regex and in researching for an answer found many cryptic answers, I hope someone here can lend a hand. I am validating an input field for MM/DD and am limiting the input to numbers only with
ng-pattern="/^0|[1-9]\d*$/"
The format we are using in the app is MM/YY, with the '/' automatically being entered with jQuery .keypress function. For some reason the field validates fine until after the '/' and then it only validates the last two numbers.
Is there a pattern that will essentially ignore the '/' so the entire field can be validated for numbers only?
Thank you for your help.