[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Regular expression for matching lines
- From: Shmuel Zeigerman <shmuz@...>
- Date: Thu, 26 Jul 2007 17:34:23 +0200
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