note 22537 deleted from function.preg-replace by sniper

From: Date: Sun, 07 Sep 2003 22:06:46 +0000
Subject: note 22537 deleted from function.preg-replace by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-55707@lists.php.net to get a copy of this message
Note Submitter: bbisgod AT hotmail DOT com ---- Wrote this to make a RegExp for use in Javascript to check to see if a number is larger than another function MakeMinReg ($Ref) { $tmp = preg_split("//",$Ref); foreach ($tmp as $key => $val) { if ($val != "") { $Refs[] = $val; } } foreach ($Refs as $key => $val) { $RegRef .= "("; for ($x = 0; $x < count($Refs); $x++) { if ($x == $key) { $RegRef .= "[".$Refs[$x]."-9]"; } else { $RegRef .= $Refs[$x]; } } $RegRef .= ")|"; } $RegRef .= "\d{".(count($Refs)+1).",}"; return $RegRef; }

« previous php.notes (#55707) next »