fork(1) download
  1. a = "x x x"
  2.  
  3. pos = 0
  4. while true do
  5. pos = a:find( "x", pos + 1 )
  6. if not pos then break end
  7. print( pos ) -- poderia armazenar numa tabela
  8. end
  9.  
Success #stdin #stdout 0.02s 2496KB
stdin
Standard input is empty
stdout
1
4
7