Community Patterns

Community Library Entry

1

Regular Expression
Created·2022-01-25 18:29
Updated·2022-01-25 18:36
Flavor·ECMAScript (JavaScript)

/
^-?\d+\.?(\d+)?([eE][+-]?\d+)?$
/
gm
Open regex in editor

Description

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

Submitted by Ann MB