It reads as /, followed by one or more characters which aren't /, followed by the end of string. It works because of backtracking. When it can't find a match with the first slash (because there are other slashes between it and the end of string), it tries starting at a different slash. Rinse and repeat until a match is found, or there are no more slashes at which to start.