note 47037 deleted from function.eregi by tularis

From: Date: Sun, 31 Oct 2004 22:22:32 +0000
Subject: note 47037 deleted from function.eregi by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-79419@lists.php.net to get a copy of this message
Note Submitter: trance at mainframehosting dot com ---- When using ereg or eregi you can specify if you wish to extract your regex into an array that can be used later. A simple example of this is extracting the file extension from an uploaded file to later append onto a randomly generated name. <?php eregi ("\.[a-zA-Z0-9]+$", $_FILES["file"]['name'], $ext); echo $ext[0]; ?> Nate ---- Reason: useless example

« previous php.notes (#79419) next »