Regular Expressions 101

Sponsors

Library entries

Match decimal number (integer, floating-point, scientific)

Vote

0

Regular Expression
javascript

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

Description

Loading markdown...
Submitted by anonymous - 4 years ago