Regular Expressions 101

Community Patterns

Community Library Entry

-3

Regular Expression
ECMAScript (JavaScript)

/
-?\d+\.?\d*
/
g

Description

Gets all numbers in a string. This includes positive and negative numbers aswell as integers and floats.

By: http://www.benlorantfy.com/

Submitted by Ben - 10 years ago