lua-users home
lua-l archive

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


How about this?

s='the quick brown fox jumps over the lazy dog'
w='the'

print(s:find(w))		-- first match (position is first return value)
print(s:find('.*()'..w))	-- last match (position is third return value)