get("#349") -- table functions -- an example text (taken from #523) text = [[ get("#515") -- splitLines text = getSnippet("#2000025") lines = splitLines(text) header = lines[1]:gsub(" +", " "):gsub("^ ", ""):gsub(" $", "") print(header) ]] function findReferences(text) refs = {} for word in text:gmatch("#%d+") do refs[word] = true end return keystolist(refs) end refs = findReferences(text) table.sort(refs) s = table.concat(refs, " ") print(s) assert(s == "#2000025 #515") return true