We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
<?php $source = "..///my\\\\\\\\..///sub\\\\dir/"; // The following code works exactly the way I want it to, however I would rather the last two lines be combined into one regular expression. $source = str_replace('.','',$source); $result = preg_replace('#[\\\\/]+#', DIRECTORY_SEPARATOR, $source); echo $result; ?>
Add your voice to the tech community where 5M+ people just like you are talking about what matters.