On Wed, Aug 08, 2007 at 11:39:20PM +0100, Joker7 wrote:
> Can anyone give me some pointer,here's my problem.I wish 
> to move a file from a local server to a remote one.The file 
> is in the format ([EMAIL PROTECTED]) on moving the 
> file to the remote server I wish to remove the time stamp 
> part of the file and just leave ( video.jpg ). To be trueful 
> I don't have a clue where to start I did a bit of Google-ing 
> to see if I could find a ready made script with out luck.So 
> any help will be most welcome.

If the filename is never going to contain any number or @ you
cold use

  <?php
  $dirt = array ("0","1","2","3","4","5","6","7","8","9","@");
  $wash = str_replace($dirt, null, $filename);
  ?>

otherwise

  <?php
  $wash = preg_replace('/([EMAIL PROTECTED])@[^.]*(.+)/', "\\1\\2", $filename);
  ?>

Regards
  Steffen

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to