All I want is a simple mask for valid JavaScript numbers. I expect a bit of complexity in handling exponents, Hex and the Octal formats all in one, but I wasn’t expecting something this cryptic. I like code that you can simply read, whereas this monstrosity requires a full page of explanation. /^[+-]?(0[0-7]+|0x[\da-f]+|((0|[1-9]\d*|0\d*[89]\d*)(\.\d*)?|\.\d+)(e[+-]?\d+)?)$/i Blah! EDIT: […]