replacing directory references at beginning of file name
| From: | Dennis Gearon | Date: | Mon, 21 May 2001 21:26:40 +0000 |
| Subject: | replacing directory references at beginning of file name | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-53780@lists.php.net to get a copy of this message | ||
Could someone please send me the code for doing the above? I have the
book, "Mastering Regex, blah blah", but I don't have time to read it
until the end of the school quarter."
I'd like to remove the following chars from the beginning of a string:
'$', '\', '/', and '.' .
I plan on doing it like so:
while( ereg_replace( $dir_remove_patt, "", $file_name) ){;}
I need the value for $dir_remove_patt, and I would be most grateful. I'm
a stubborn kind of guy, and I don't usually ask for direct help; I'm not
a moocher of code. But I could use some help, thanks :-)