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