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", 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 :-)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to