[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Iterating over string with delimiter that is multiple occurrences of the same character
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 11 Oct 2013 11:07:29 -0300
> 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.. ";;"
for p in t:gmatch("(.-);+") do print(p) end