Regex to accept 5.0 and reject 5.1 : I have been searching for a while , my requirement is I want to accept only integers and if user enters 5.00 that also I want to accept but I do not want to accept 5.01




I have seen regex to accept only integers but that does not meet my requirement completely.

REGEX to ACCEPT:
5.0,
7.0,
9.00,
77

REGEX to DECLINE:
5.1,
55.45