Regular Expressions 101

Community Patterns

There does not seem to be anything here

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

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

Description

As 'number' is not implemented by all browsers, you can check your <input type="text" /> value with this RegExp.

Submitted by Ann MB - 3 years ago (Last modified 3 years ago)