Re: regex

From: Date: Thu, 28 Mar 2002 05:33:49 +0000
Subject: Re: regex
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-90474@lists.php.net to get a copy of this message
preg syntax is different to ereg (which you are using). You also need to provide an output variable. This would work: preg_match( "/[0-9]+/", $input, $output ); -- Matt "Carl E Shmidt" <lanvaledsl@earthlink.net> wrote in message news:20020328035347.89020.qmail@pb1.pair.com... > Now I'm looking to find 1 or more digits in an input: > > preg_match("[[:digit:]]",$valToEval); > > I'm passing the value "12" and this thing still returns 0. What's going on? > > Carl > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#90474) next »