It seems like an easy problem to solve, but It's not as easy as it seems. I have this string in PHP:
////%postname%/
This is a URL and I never want more than one slash in a row. I never want to remove the slashes completely.
This is how it should look like:
/%postname%/
Because the structure could look different I need a clever preg replace regexp, I think. It need to work with URLS like this:
////%postname%//mytest/test///testing
which should be converted to this:
/%postname%/mytest/test/testing