I am a fresher in Javascript, I want to write a regular expression for 4 to 30 and only even numbers. I have created a text field in Html and I want to validate based upon the regular expression.
I copied the following one, but it is not working for 4.
([12][02468])|([0][68])|([3][0])|(^[68])
This regular expression is not accepting 4 as number, it only accepts from 6. It should except 4 as minimum and other even numbers only, maximum value will be 30.
4, 6,8, 22, 26,24, 30 are allowed.
0, 1, 2, 3, 5, 31 21, 11 are not allowed.
Experts, help to solve this problem in Javascript.