Also, I still can't seem to get this pattern to match properly... $ZAPmath = "/^[-+*/% ()0-9.]+$/"; if (! preg_match($ZAPmath, $value)) $m .= "Invalid numeric input. "; It returns very unpredictable results. Can't seem to get it right... Thanks in advance... Cheers, Dan