Core Function Match
From Sputnik Wiki
Match( <string>, <pattern>, <offset> )
Contents |
Description
Search for the first match of pattern in a string if found return the captures from the pattern.
Parameters
string
The string to evaluate.
pattern
Go read the Patterns section on the Find( ) function to learn how to create and use patterns then come back here to put it to use on this function.
offset
Optional; Specifies where to start the search; its default value is 0 and can be negative.
Return Value
Remarks
This function is pretty much the same a the LUA String.Match() however this one returns start position starting at 0 (LUA's starts at 1) and lowers the end position by 1, Also the Offset begins at 0 here where as in LUA it begins at 1.
This is because in Sputnik chars in a string start at 0 not 1.