Posted 19 May 2013 - 05:37 PM
Hey guys,
I've been starting to learn more about this function and the stuff it does, but I still don't get a part of it:
For example in this:
What does the "%w+" exactly mean? In other scripts I've seen things like "[^%s]+" or even "%a+".
I see this differ a lot everywhere, and on the lua manuals I can't really find the origin of the choice of what you type there :/
I do realize that this is a kind of search pattern?
Thanks ahead!
I've been starting to learn more about this function and the stuff it does, but I still don't get a part of it:
For example in this:
for blabla in string.gmatch(text, "%w+") do
print(blabla)
end
What does the "%w+" exactly mean? In other scripts I've seen things like "[^%s]+" or even "%a+".
I see this differ a lot everywhere, and on the lua manuals I can't really find the origin of the choice of what you type there :/
I do realize that this is a kind of search pattern?
Thanks ahead!