Regular Expressions 101

Community Patterns

Extract currency with currency symbol if present

7

Regular Expression
ECMAScript (JavaScript)

/
([£\$])*([\d,.]*)
/
g

Description

Extracts values of the form £nnn,nnn.nn or $nnn.nnn from text

Submitted by Simon Gardner - 9 years ago