Take the tour ×  What I want is, there is a textbox with maximum
length of 5. The values allowed are..    1. any integer // for
example 1, 3, 9, 9239 all are valid   2. real number, with
exaclty one point after decimal // eg. 1.2, 93.7 valid and
61.37, 55.67 invalid   3. it is also allowed to enter only
decimal and a digit after that, that is .7 is valid entry (would
be considered as 0.7)  I found this page, http://www.regular-
expressions.info/refadv.html So what I thought is that    1.
There is a digit   2. If there is a digit and a decimal after
that, there must be one number after that   3. If there is no
digit there must be a decimal and a digit after that  So, the
regex I made is..  a single digit one or more => /d+   an
optional decimal point followed by exactly one digit =>
(?:[.]\d{1})?   if first condition matches => (?(first
condition) => (?((?<=\d+)   then, match the option decimal and
one exact digit =>(?((?<=\d+)(?:[.]\d{1})?   else => | find if
there is a decimal and one exact digit => (?:[.]\d{