fork download
  1. testA = "test.test test.test"
  2. local t1 = {}
  3. for X in string.gfind (testA, "[^ ]+") do
  4. table.insert (t1 ,X)
  5. end
  6. print(table.concat(t1, "", 1, 1));
  7.  
  8. --output/first test.test
  9.  
  10. testA = "11.11.11.11 test.test"
  11. local t2 = {}
  12. for X in string.gfind (testA, "[^ ]+") do
  13. table.insert (t2 ,X)
  14. end
  15. print(table.concat(t2, "", 1, 1));
  16.  
  17. --output/first 11.11.11.11
  18.  
  19. testA = "178.73.210.210 www.www.se"
  20. local t3 = {}
  21. for X in string.gfind (testA, "[^ ]+") do
  22. table.insert (t3 ,X)
  23. end
  24. print(table.concat(t3, "", 1, 1));
  25.  
  26. --output/first 100.100.100.100 test.test
Success #stdin #stdout 0.01s 2496KB
stdin
Standard input is empty
stdout
test.test
11.11.11.11
178.73.210.210	www.www.se