View Single Post
09-18-15, 02:04 PM   #10
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
It's possible I'm misunderstanding what the goal is here, but why aren't you just matching the word pattern you're searching for?

eg.
Lua Code:
  1. for word in string.gmatch('function someFunction(t,f) print(t,f) end', '[_%a][_%w]+') do print(word) end

Code:
function
someFunction
print
end

Last edited by semlar : 09-18-15 at 02:42 PM.
  Reply With Quote