Community Patterns

Community Library Entry

1

Regular Expression
Created·2014-01-03 17:29
Flavor·PCRE (Legacy)

/
\$?\s*(\d{1,3}(,\d{3})+|\d+)(\.(\d\d))?
/
Open regex in editor

Description

Group 1 has dollar amount with or without commas, Group 4 has optional cents.

Submitted by anonymous