Test, validate and match regular expressions
This regex matches US currency amounts, including an optional leading dollar sign, comma-separated thousands (e.g., 1,234 or 12,345,678), or plain numbers, followed by an optional two-digit decimal. It is useful for validating user input in payment forms, parsing financial data, or filtering price strings. Note that the decimal separator is technically any character due to the unescaped dot, but in practice it works for standard decimal points.