is there any way to dump the result of this directly into an array or a table?
i.e.
array={}
SomeTableElement={
"^(.+) searching for 2 (.+) matches here%.",
"^only searching for 1 (+.) here%."
}
for i=1,2 do
array = string.match(aString, SomeTableElement[i])
--do something with array here
end
I am trying to make a flexible string search that bases itself on valus in a table, but I can't seem to create a universal way to store all the data coming out of the string.match() function.
I'm extremely new to LUA and any help is greatly appreciated.
i.e.
array={}
SomeTableElement={
"^(.+) searching for 2 (.+) matches here%.",
"^only searching for 1 (+.) here%."
}
for i=1,2 do
array = string.match(aString, SomeTableElement[i])
--do something with array here
end
I am trying to make a flexible string search that bases itself on valus in a table, but I can't seem to create a universal way to store all the data coming out of the string.match() function.
I'm extremely new to LUA and any help is greatly appreciated.