Regular Expressions 101

Community Patterns

Unformatted Decimal number

1

Regular Expression
ECMAScript (JavaScript)

/
^[+-]?\d*\.?\d+$
/
gm

Description

Matches any mathematically correct decimal number which is not formatted.

Submitted by XeNoX (D:T0M11#1774, G/XNX11, i@xenox_officiel, T@XeNoXoff) - 2 years ago