nanos world API Reference Unofficial documentation
Function Shared Native

string.match

Looks for the first match of <code>pattern</code> in the string.

Syntax

Lua
string.match(string, pattern, startPosition)

Parameters

Name Type Default Description
string string String which should be searched in for matches.
pattern string The pattern that defines what should be matched.
startPosition number The start index to start the matching from, can be negative to start the match from a position relative to the end.

Returns

  • number