Guest User

Untitled

a guest
Nov 20th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1.  
  2. function main()
  3. regex = [[false"><a title="(.-)"%starget=".-"%shref="(.-)%.html"]]
  4.  
  5. f = io.open("test.html", "r")
  6. html = f:read("*a")
  7. f:close()
  8.  
  9. s_idx, e_idx, title, url = string.find(html, regex, 0)
  10.  
  11. while s_idx ~= nil do
  12. print(title)
  13. print(url)
  14. print()
  15.  
  16. s_idx, e_idx, title, url = string.find(html, regex, e_idx)
  17. end
  18.  
  19. --print(url)
  20.  
  21. end
  22.  
  23. main()
  24.  
  25. -- s = [[Deadline is 30/05/1999, "firm"]]
  26.  
  27. -- print(string.find(s,[[(.*)"(.*)"]]))
Add Comment
Please, Sign In to add comment