lua-users home
lua-l archive

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


On Wed, Jan 5, 2011 at 9:46 AM, beo wulf <beowulf@intamp.com> wrote:
> ("a=b"):gsub("(.*)=(.*)", '%1="%2"')

("a=b"):gsub("(.-)=(.+)", '%1="%2"')

The '-' means 'non greedy' match, so that 'a=b=c' will be split into
'a="b=c"'. And I'm assuming you don't want to match just '='

steve d.