Community Patterns

Community Library Entry

1

Regular Expression
Created·2015-01-21 16:10
Flavor·PCRE (Legacy)

/
(-?\d{1,3}(,?\d{3})*(\.\d{2}?))(\D|$)
/
Open regex in editor

Description

Matching numbers related to financial amounts. Does not consider the type of currency.

Will not match:

34 1.005 33,00

Will match:

00.40 1.40$ -6,663,330.00

Submitted by elgehelge