I need to get the price from a string, but no other numbers. There are no restrictions on what the string can say, but it will always have a dollar amount in it. It's the dollar amount I need to get from the string.
The closest solution I've been able to find is \d{1,3}[,\\.]?(\\d{1,2})?
On an example string like, "2 BED / 2 BATH for $120,000.00, what a deal!!!", the regex should only return $1,000,000, and no other numbers. The solution above will return 2, 2, and 1,000,000.00. An ideal solution should NOT match on any digits that are outside of the dollar amount. It also needs to include the symbol immediately before the match (to account for the possibility of all currency symbols (USD, GBP, EUR, etc).
So, the price that's matched by the regex should look like: $120,000.00, but it could also match on something like €40,000