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