Quick actions

cmd+k|ctrl+k

Navigation

Languages

take growidpw

Snippet info

Language

Lua

Visibility

public

Author

fjrbgs

Created

2023-07-11T13:41:40.000201Z

Updated

2023-08-15T11:31:40.673338Z

data = [[

]]

-- Open the file in write mode
local file = io.open("id pw.txt", "w")

for line in data:gmatch("[^\r\n]+") do
  local words = {}
  for word in line:gmatch("[^|]+") do
    table.insert(words, word)
  end
  if #words >= 2 then
    local first_word = words[1]
    local second_word = words[2]
    
    -- Write the extracted first and second words to the file
    print(first_word .. ":" .. second_word .. "\n")
  end
end
INFO