how to remove forward slashes in path in nodejs code example Example: remove double slash from url javascript abc.replace(/([^:]\/)\/+/g, "$1");