Hello, This is my first attempt at regex. I would like to verify if its proper form.
<?php
if(!eregi('^[1-9]{2,3},|\.[0-9]{2,3}\.[0-9]{2}', stripslashes(trim($_POST['amount']) ) ) )
{
$problem = TRUE;
}
if(!$problem)
{
echo 'Thank you.';
}else{
echo 'Please go back and enter a proper ammount
}
?>
Basically it needs to check if the payment is in this form $10.00 or 100.00 or 10,000.00
Also i dont know how to allow it to do 1,000.00 without allowing 1.00 or 1,00.00