|
|
||
|
Eike Decker wrote:
I am trying to find a regular expression that matches each line of an input string but cannot find an expression that needs no additional checks.
1-st method:
for line in (str.."\n"):gmatch("([^\n]*)\n") do
2-nd method (using split from Lrexlib):
for line in rex.split(str, "\n") do
(various flavors of split can be written in Lua, of course).
--
Shmuel