regex
| From: | Gerard Samuel | Date: | Tue, 11 Jun 2002 22:11:25 +0000 |
| Subject: | regex | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-101632@lists.php.net to get a copy of this message | ||
Im expecting a string like foo.png.
Im trying to replace 'foo' with another value that I have.
Im trying this ->
$file = preg_replace('/([a-z][0-9]-_*)(.[a-z]{3,4})/i', $new_file . "$2", $_FILES['upload']['name']);
The second regex group works ok, its the first one I cannot figure out.
It is supposed to contain alpha numeric characters and '_' and '-'.
Thanks for any input.
--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/