lua-users home
lua-l archive

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


Hi everyone,

  i was writing a lua script for searching a pattern in a multiline string.
the code snippet looks like below :

   local text="multi-line huge string chunk"
   local pattern = "hello world"
   print("String found " .. string.match(text,pattern))

and this give me a result like below :

   String found b

my intention was to make a condition based action if string found, but here i was getting "b".

Any help would be great !!

--
SANTHO