Yes, my fault. The regex is needless really, which makes it rather inane.
I don't know what you meant by $2 being positive with the isnum operator. It's not checking range but ensuring $2 is a number.