View Single Post
09-19-15, 02:24 AM   #11
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
Originally Posted by semlar View Post
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
This is a very simple and effective approach. Could you please break down how the pattern works?
__________________
  Reply With Quote