javascript - what am I missing in this RegEx? -
i'm trying create javascript regex test for:
a valid # between 0 , 99.9 (where single decimal digit allowed) e.g. 3.45 not valid.
so, blank ok, integer between 0 , 99 ok, , decimal value allowed.
i have far, allowing values 3.45
pass:
$^|$[0-9][0-9]?^|$[0-9][0-9]?.[0-9]^
two problems can see:
- you mixed ^ , $.
- your decimal point needs escaping
\.
.
Comments
Post a Comment