Regular Expressions 101

Community Patterns

price selector

1

Regular Expression
PCRE (PHP <7.3)

/
\$\s?(\d+[\.\s,\dk]+)|(\d+[\.\s,\dk]+)\$
/
mig

Description

Matches any of the prices in the text below: Im asking $15,500 OBO Im asking 15,400$ Im asking 15400$ Im asking $15400 Im asking 15 400$ Im asking $15 400 Im asking 15.400$ Im asking $15.400 Im asking $ 15,400 Im asking 15,400 $ Im asking 15.400 $ Im asking $ 15.400

Submitted by chocksy - 10 years ago