lua-users home
lua-l archive

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


Yehuda Eisenstark wrote:
In PCRE the ? makes the .* not greedy. I just assumed that was supported
in rex as well. The string I'm parsing is XML, so I just need to figure
out how to make rex.match use multiline searches. In Perl you use the /m
flag, what's the equivalent in Lua?

In Lua, ".-" is the equivalent to Perl's ".*?". There's no equivalent to /m though. But you can use PCRE in Lua with Lrexlib [1].

[1] http://luaforge.net/frs/?group_id=63

--
Shmuel