正则表达式
<body>
<?php
$in=”2344″;
if(ereg(“^(-{0,1}|\+{0,1})[0-9]+(\.{0,1}[0-9]+)$”,$in))
echo “Ok!”;
else
echo “Sorry,Please input ag来2源gaodaima#com搞(代@码&网ain!”;
?>
很简单的嘛!
正则表达式
<body>
<?php
$in=”2344″;
if(ereg(“^(-{0,1}|\+{0,1})[0-9]+(\.{0,1}[0-9]+)$”,$in))
echo “Ok!”;
else
echo “Sorry,Please input ag来2源gaodaima#com搞(代@码&网ain!”;
?>
很简单的嘛!