WoW:Pattern matching: Difference between revisions

m
→‎"Regexes" (patterns) in Lua: Corrected wrong description of string.match
No edit summary
m (→‎"Regexes" (patterns) in Lua: Corrected wrong description of string.match)
Line 8: Line 8:
* string.gfind(string, pattern) -- when called repeatedly, finds each successive instance of pattern in string
* string.gfind(string, pattern) -- when called repeatedly, finds each successive instance of pattern in string
* string.gsub(string, pattern, repl) -- returns a string where all instances of pattern in string have been replaced with repl
* string.gsub(string, pattern, repl) -- returns a string where all instances of pattern in string have been replaced with repl
* string.match(string, pattern, limit) -- returns a list of matches up to limit or all of them if no limit passed
* string.match(string, pattern, init) -- Returns match of pattern in string, starting search at init.


== Constructing a pattern ==
== Constructing a pattern ==
Anonymous user