A regular expression to match the dollar symbol and comma in a string.
Can be useful in removing unnecessary $ and , from a currency string. e.g., $12,345.12 -> 12345.12.
/[$,]/g
Matches:
- $123,456.78
- $123,456.78 $6,796
See Also:
- Currency Regular Expressions
- Regular Expression For Formatted Number With Space As Thousand Separator