09.07.2015, 11:54
Nice example, one small improvement: you can use captures inside of regexps like this:
Both lines do exactly the same thing, but you don't have to count characters when using captures
Code:
power=string.sub(string.match(response_body,"<Power>%a+</Power>"), 8, -9)
power=string.match(response_body,"<Power>(%a+)</Power>")
Both lines do exactly the same thing, but you don't have to count characters when using captures