lua-users home
lua-l archive

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


On 2 May 2012 23:36, Josh Haberman <jhaberman@gmail.com> wrote:
> Lua appears to have no literal substring match (find, match, and gmatch all
> take patterns), and also no function for quoting a string into a pattern
> that will match that precise string.  So there seems to be no way (short of
> implementing your own pattern quoting) to do a literal substring match in
> Lua.  Am I missing something?
>

string.find() has a 'plain' flag to do this.

Regards,
Matthew