Regular Expressions 101

Community Patterns

Match Currencies with Optional Symbols

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?:[$€£¥]?)(\d+(?:\.\d{2})?)$
/
gm

Description

Submitted by anonymous - a month ago