lua-users home
lua-l archive

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


Keith Pimmel wrote:

> I try anchoring it with the following
> 
> _,_,last = string.find(str,'(^\n]*$)')
> 
> which produces
> nil

Try this:

_, _, last = string.find(str, '([^\n]*)$')

Lua (for some reason) doesn't like anchors to be inside
captures.

-- 
Aaron