s = 'http://oglobo.globo.com//fotos/2010/01/18/18_FHA_prima4.jpg'; d = string.match(s, "%d+/%d+/%d+") print(string.match(s, "%d+/%d+/%d+")) print(string.sub(s, string.find(s, "%d%d%d%d/%d%d/%d%d"))) s = 'http://oglobo.globo.com//fotos/2010/01/18/18_FHA_prima4.jpg'; d = string.match(s, "%d+/%d+/%d+") print(string.match(s, "%d+/%d+/%d+")) d, m, y = string.match(s, "(%d+)/(%d+)/(%d+)") print(d, m, y) a, m, d = string.match(s, "(%d%d%d%d)/(%d%d)/(%d%d)") print(d, m, a) print('Hoje é dia ' .. d .. ' de ' .. m .. ' de ' .. a)