replace multiple separators. fixes #2448