Regular Expressions 101

Community Patterns

Simple Number


Regular Expression
ECMAScript (JavaScript)



Verifies Number is a negative/positive number. Number may be a decimal, but if it is, it requires at least one number before and after the decimal place. Decimal numbers may also be negative or positive. Only 1 decimal place is allowed.

Submitted by David P Smith - 9 years ago