removing double backslashes and leaving singles
| From: | Dennis Gearon | Date: | Tue, 22 May 2001 16:10:28 +0000 |
| Subject: | removing double backslashes and leaving singles | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-53876@lists.php.net to get a copy of this message | ||
I've tried this and it doesn't work, any ideas?
$illegal_chars="[^a-zA-Z0-9._\\:]|\\\\";
$dir="c:\\t.e.s.t.\\\\7.";
$dir_name = ereg_replace($illegal_chars, "", $dir_name);
it removes the single double slash after :, as well.
this is on version 4.0.3pl1
would some people please test this on their boxes/versions?
I tried preg_replace(), and it did the same thing. I don't think it
should remove that single backslash, right?