a = "x x x"
pos = 0
while true do
pos = a:find( "x", pos + 1 )
if not pos then break end
print( pos ) -- poderia armazenar numa tabela
end
YSA9ICJ4ICB4ICB4IgoKcG9zID0gMAp3aGlsZSB0cnVlIGRvCglwb3MgPSBhOmZpbmQoICJ4IiwgcG9zICsgMSApCglpZiBub3QgcG9zIHRoZW4gYnJlYWsgZW5kCglwcmludCggcG9zICkgIC0tIHBvZGVyaWEgYXJtYXplbmFyIG51bWEgdGFiZWxhCmVuZAo=