Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main()
- regex = [[false"><a title="(.-)"%starget=".-"%shref="(.-)%.html"]]
- f = io.open("test.html", "r")
- html = f:read("*a")
- f:close()
- s_idx, e_idx, title, url = string.find(html, regex, 0)
- while s_idx ~= nil do
- print(title)
- print(url)
- print()
- s_idx, e_idx, title, url = string.find(html, regex, e_idx)
- end
- --print(url)
- end
- main()
- -- s = [[Deadline is 30/05/1999, "firm"]]
- -- print(string.find(s,[[(.*)"(.*)"]]))
Add Comment
Please, Sign In to add comment