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

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -