I know how to validate a constant string with regex, but I'm really having trouble finding out how to do the following: I want a regex to validate the string edv_ after that I want the validation to be dependent:
- if the user inputs for example
edv_2, only6or7can be the next character. So onlyedv_26oredv_27would be valid - if the user would enter
edv_3then onlyedv_32oredv_39would be valid
Ive tried searching on the internet watched several youtube tutorials. None of them seem to handle this kind of thing. It's always only 1 constant thing they want to validate.
/[e][d][v][_][A]/ig
This matches the first part (edv_digit) but I have no clue how I should continue with the if else conditions.