regex problem

From: Date: Sat, 31 May 2003 18:46:44 +0000
Subject: regex problem
Groups: php.general 
Request: Send a blank email to php-general+get-149663@lists.php.net to get a copy of this message
Hello,, I have a preg_match issue matching numbers. I am currently using !preg_match ('/([0-9\-\.\#:])/', $_POST['nums1'] throw error[] This fails if you use something like ' asdf ' but if you use ' asdf789 ' it passes false and does not throw an error. This is not the obvious solution.... I know its a problem in my regular expression. Should I ONLY be using ' /([0-9])/ ' , ? Thanks in advance. Daniel

« previous php.general (#149663) next »