string.gsub returns two variables, the updated string and the pattern occurrences. The outer string.gsub would replace n occurrences, or nothing if the string did not contain '%'.