lua-users home
lua-l archive

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


On May 28, 2012, at 9:29 PM, Mike McGonagle wrote:

> how do I parse the string to get the left paren? 

As mentioned, you need to escape the parenthesis with a percent sign:

http://www.lua.org/manual/5.2/manual.html#6.4.1

Alternatively, if your brackets are matching, try %b, e.g.:

print( ( 'obj index (0 6 45)' ):match( '%b()' ) )

> (0 6 45)