lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Maxime Chupin wrote:
I tried :
a="cou   cou cou";
b=string.find(a,"(%s+)");
but b[1] and b[2] does not work.

You can have such behavior by putting results into a table:
    b = { string.find(a,"(%s+)") }
Then:
b[1] will contain 4
b[2] will contain 6
b[3] will contain "   "

--
Shmuel