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
Related patterns
US Currency (USD)
NumbersMatches USD currency amounts with optional $ sign, thousands separators, and cents.
Binary Number Literal
NumbersMatch binary number literals like `0b1010` or `0B11110000`.
Decimal Number
NumbersMatches decimal numbers, including integers and negatives.
Float / Scientific Number
NumbersMatch floating-point and scientific-notation numbers including `1.5`, `.25`, `1e10`, `-3.14E-2`.