Re: [PHP] replacing directory references at beginning of file name

2001-05-22 Thread James Holloway
Dennis, NOT tested: $string = preg_replace("/^(\$|\\\|\/|\.)/i", "", $string); James. "Dennis Gearon" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Could someone please send me the code for doing the above? I have the > book, "Mastering Regex, blah blah",

[PHP] replacing directory references at beginning of file name

2001-05-21 Thread Dennis Gearon
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