Numbersflags: g
USD Currency (Inline)
Match US dollar amounts inline in text: `$1,234.56`, `$99`, `$1,000,000.00`.
Try it in RegexPro →Available in
Pattern
regexengine-agnostic
\$\d{1,3}(?:,\d{3})*(?:\.\d{2})? (flags: g)Raw source: \$\d{1,3}(?:,\d{3})*(?:\.\d{2})?
How it works
\$ matches the literal dollar sign. \d{1,3} matches the first 1–3 digits. (?:,\d{3})* matches additional thousands groups (comma + 3 digits). (?:\.\d{2})? optionally matches a decimal portion with exactly two digits (cents).
Examples
Input
Total $1,234.56 plus tax of $99Matches
$1,234.56$99
Input
Bonus $1,000,000.00 awardedMatches
$1,000,000.00
Input
no money mentionedNo match
—Common use cases
- •PII / financial data redaction
- •Receipt OCR post-processing
- •Sentiment / earnings call analysis
- •Marketing copy auditing for promised price ranges