I want users to be allowed to enter numbers, up to 3 digits before the decimal place, with an optional decimal place and a maximum of 2 digits after the optional decimal place.
I want it to match: 12, 123, 123.5, 123.55, 123. I do not want it to match: abc, 1234, 123.555
What I have so far it: ^\d{0,3}(.?)\d{0,2}$
At the moment it is still matching 1234. I think I need to use the look behind operator somehow but I'm not sure how.
Thanks