$url = "example-com--folder";
$searchArray = array('/-/','/--/');
$replaceArray = array('.','/');
$url = preg_replace($searchArray, $replaceArray, $url);
The output I want is example.com/folder
but all I get now is example.com..folder
I know this is because I don't have the proper regex pattern, but what would that pattern be?