in reply to Re: Re: Regex Dollar Amounts
in thread Regex Dollar Amounts

Hi Again Eric
I tried the line
if($amount =~ m/^-?(\d+)\.(\d\d)$/)
But this regex is forcing me to put a non digit character in place for it to be true
If I use $50.00, c50.00, abcd50.00 and so on it will produce a true result and allow the user to pass.
So here is what I did and it seems to be working
if ($Amount !~ m/^-?(\d+)\.(\d\d)$/) { display_output($templatefile,);#error page print <<EOF;#good result, move on

I had to change the =~ to !~ because it didn't like having
 print <<EOF; before the display_output($templatefile,);
for some reason.
But it looks like all is well in Dodge City now. Thanks!
Wes