I need regular expression validation for first 5 digits are numbers then hyphen and then one digit is alphabet and other one is numeric.
ex : 23456-p5 or 12345-a3 something like that.
I have tried something like this to start with
and in model i have given like this as we don't have to give ^ or $ in data annotations
But i couldnt get it to work even this.
An expression like this should work: