in reply to What does this regex do?

/^-?\.?\d+(?:\.\d+)?$/
It means match if there's a - in front or not, followed by an optional . (period), then one or more digits, then optionally a . (period) followed by one or more digits. Since it's anchored at the front and back, that's all it can match. So it matches numbers like
-.5 or 5.5522 or -62.0
Since it's using the !~, it'll match anything but that.