Intro to Regular Expressions
Regular-Expressions.info's JavaScript Guide
MSDN's Intro to Regular Expressions
Useful Validation Regexes
A natural number (positive integer): /^\d+$/
An integer: /^-?\d+$/
A float: /^-?(\d+\.?\d*|\d*\.\d+)$/
It's worth noting that these are only sanity checks and don't guarantee the base or value of the actual number (e.g. 000000.10000 would pass the float check).