You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zetaepyon edited this page Jan 9, 2018
·
2 revisions
Provides the most necessary regular expression functions Lua is lacking.
windower.regex.match(string, pattern)
stringstring - String to search
patternstring - Regular expression pattern to search for
Returns a table containing matches, if they are found. Nested tables contain further capturing groups. Otherwise returns nil.
windower.regex.replace(string, pattern, replace)
stringstring - String to search
patternstring - Regular expression pattern to search for
replacestring | table | function - String, function or table to replace the match with
Returns string with all matches of pattern replaced with replace. If replace is a table it will look up the match in it, if it is a function, it will pass the match as an argument and replace it with the returned value.
windower.regex.split(string, pattern)
stringstring - String to search
patternstring - Regular expression pattern to search for
Splits a string on a certain regular expression pattern. Returns a list of strings.