I need to extract domain (four.five
) from URL (one.two.three.four.five
) in a Lua string variable.
I can't seem to find a function to do this in Lua.
EDIT:
By the time the URL gets to me, the http
stuff has already been stripped off. So, some examples are:
a) safebrowsing.google.com
b) i2.cdn.turner.com
c) powerdns.13854.n7.nabble.com
so my result should be:
a) google.com
b) turner.com
c) nabble.com