what Regex Expression do we need to use in this scenario
Iam looking to have Regular Expression where we need to validate the user that he cannot enter a value of “ZERO”
is this correct “regex”:/^0$/,
Valid responses are:
1,2,3,4,5,6,7,8,9,10,20,
Invalid Responses are
0
No, and it is rather complicated and clumsy to write a regex saying “but not x”. Try to avoid regexes in that case.