But When I pass 0 it is saying "out of range" and when I pass 24 it is saying Integer with range.
I don't know what is the problem with it.
Can any one please take look and correct me?
Sorry ghostdog74. I think I could not express my requirement propperly. Actually my requirement is The variable can contain at least 1 or at most 23. (Integer only.)
I need a regular expression which satisfy all the integer 1 though 23 including both 1 and 23.
If we try to assign any value less than 1 (Say 0 or -1 or .5) It should fail similarly if we try to assign any value greater than 23 (say 24 or 25 ...) it should fail. Similrly if we give any decimal value like 1.5 or 20.4 or 3.5 etc then also it should fail.