Back to Library
Numbers

Currency (USD)

Matches a price in USD, with optional cents.

Pattern
^\$?\d{1,3}(?:,\d{3})*(?:\.\d{2})?$

Test Cases

$1,234.56 Match
100 Match

Try it Live

Test and customize this pattern in our interactive editor

Open in Editor