Regular expression
A dollar sign immediately followed by one or more digits, and then optionally a period and exactly two more digits (for example, "$10" or "$245.99"). This does not match "$ 5", because of the space between the dollar sign and the digit, nor "€25", because there is no dollar sign.