in reply to Re: Money Regex
in thread Money Regex
I'd start with /^\$?(\d+(\.\d{1,2})?|\.\d{1,2})$/ which requires there to be at least one digit before an optional decimal and 1 or 2 digits or that there be a decimal followed by 1 or 2 digits. It is ugly but it works.
--
$you = new YOU;
honk() if $you->love(perl)
|
|---|