lua-users home
lua-l archive

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


> but what is the best way of doing the same thing for a string where the
> delimiter is ;;, e.g.
> 
> s = "a;;b;;c"             (where a, b and c can be any length and can
> include non repeating occurrences of ; )

Starting by making the string uniform with
	t = s.. ";;"

Now do
	for p in t:gmatch("(.-);+") do print(p) end