Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
(^[-+]??\d+?[.]??\d*?$)|(^[.]??\d+?$)|(^[-+]??\d+?[.]?\d*?[eE][+-]?\d+?$)
/
gm

Description

Number validation in Javascript. Abit too contrived

Submitted by b0tman - 8 years ago