SneakyDave
10-09-2000, 10:10 AM
I have a regular expression set up that I thought would allow uploaded files to only contain a-z, 0-9, -, and/or a period, stripping anything else in the file name. Its set up something like this:
$file_name = eregi_replace("[^a-z0-9\-\.]", "", $file_name);
For some reason, it doesn't work. Is there something wrong with the regexp that you can see, or doesn't it work on uploaded files names?
Edited to remove a paren.
[This message has been edited by SneakyDave (edited 10-09-00@09:14 am)]
$file_name = eregi_replace("[^a-z0-9\-\.]", "", $file_name);
For some reason, it doesn't work. Is there something wrong with the regexp that you can see, or doesn't it work on uploaded files names?
Edited to remove a paren.
[This message has been edited by SneakyDave (edited 10-09-00@09:14 am)]