Possible Bug string.find

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Possible Bug string.find

Elio G.
Hi

I have Treo680 and TJX.

Plua2.0b8
-------------------------------------------
frase="bla bla (035-271426 )bla bla"
validi="1234567890-"

for i=1,string.len(frase),1 do
  le=string.sub(frase,i,i)
  rr = string.find(validi,le,1,plain) --->>> (ERROR Program.lua:7:unfinished
capture)
end -- for
------------------------------------------

frase="bla bal (030-271426 )bla bla"
validi="1234567890-"

for i=1,string.len(frase),1 do
  le=string.sub(frase,i,i)
  if le=="(" then le="a" end
  rr = string.find(validi,le,1,plain) -->>>> OK!>>>>>>
end -- for

It is BUG ?? string.find() +"(" ?????

Thanks for Plua.