Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^-?\d*(\.(?=\d))?\d*$
/

Description

Tests a floating point number

Submitted by Josh L. Rasmussen - 9 years ago