note 95174 deleted from function.is-int by danbrown
| From: | danbrown@php.net | Date: | Wed, 16 Dec 2009 21:01:04 +0000 |
| Subject: | note 95174 deleted from function.is-int by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-164056@lists.php.net to get a copy of this message | ||
Note Submitter: jerry at foufos dot gr
----
to Roberto Rama
the regular expression you suggest
<?php
preg_match( '/^\d*$/' , $mixed)
?>
will match to an empty string.
the PCRE *, matches 0 or more occurences.
you should change the preg to
<?php
preg_match( '/^\d+$/' , $mixed)
?>
the PCRE +, matches 1 or more occurences.