that's called a "regular expression"
you may want to do some research on regular expressions to figure out what they mean, but i'll break this down for you:
/^[-+]?\d+\.\d+$/
the first "/" and last "/" are only there to enclose the regular expression:
^[-+]?\d+\.\d+$
the "^" means to check from the beginning and "$" means to check all the way to the end.
[-+]?
the ? means to match 1 or 0 of any of the characters enclosed in the square brackets [ ]...
\d+
this means to match any digit character, represented by \d, and the "+" means to match any digit 1 or more times.
\.
this means to match a period
\d+
same as the other
|