Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2021-07-06 08:47
Flavor·ECMAScript (JavaScript)

/
^(\+|\-)?(?!0*(\.0+)?$)(\d+|\d*\.\d+)$
/
gm
Open regex in editor

Description

This validator does NOT handle strings that can be interpreted as a number (expl. "0,00")

Submitted by anonymous