Skip to main content

string.match

Using lua patterns, returns the first match of the pattern in the string str. If no match is found, it returns nil.

string.match(str: string, pattern: string, start): table

Arguments

NameDescriptionType
strString to search.string
patternPattern to search for.string
startWhere to start the search. Defaults to 1, can be negative.unknown

Returns captures: table