in reply to Re^2: Regular Expression Currency Check
in thread Regular Expression Currency Check
if ( ($payment=~/^\s*\$?(?:\d{1,3},?(?=\d{3}))*[0-9]{1,3}(?:\.\d{2} +)?$/) && ($payment <= 99999.99) ) {print "right";}else{print "wrong";}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Regular Expression Currency Check
by cool_jr256 (Acolyte) on Jun 02, 2005 at 15:18 UTC |