Rename the duplicated-slash regular expression and add JSDoc