MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
<?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; ?>