Re: ereg

From: Date: Tue, 20 Jun 2000 12:20:22 +0000
Subject: Re: ereg
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2319@lists.php.net to get a copy of this message
Bummer, I'm stuck using php3 as I'm not the admin on this server...Thanks for the hint, I'll keep it in mind. Ken N http://cleveland.lug.net/~rocket/ The answer is simple if you grant that ironies are like submarines; dangerous only when submerged. On Mon, 19 Jun 2000, Charles Killian wrote: > You can try preg_grep to try and plow through the array: > > preg_grep > (PHP4 ) > > preg_grep -- Return array entries that match the pattern > Description > > array preg_grep (string pattern, array input) > > preg_grep() returns the array consisting of the elements of the input array > that match the given pattern. > > Example 1. preg_grep() example > > 1 > 2 preg_grep("/^(\d+)?\.\d+$/", $array); // find all floating point numbers > in the array > 3 > > > > > Note: This function was added in PHP 4.0. >

« previous php.general (#2319) next »