<?php $url = "example.com//sf/asf///saf//asf/asf/"; $string = preg_replace('/([^:])(\/{2,})/', '$1/', $url); echo $string;
You have javascript disabled. You will not be able to edit any code.