String.match
From OpenEUO
Revision as of 20:53, 7 October 2010 by 76.184.213.234 (Talk) (Created page with " string.match (s, pattern [, init]) Looks for the first match of pattern in the string s. If it finds one, then match returns the captures from the pattern; otherwise it returns ...")
string.match (s, pattern [, init])
Looks for the first match of pattern in the string s. If it finds one, then match returns the captures from the pattern; otherwise it returns nil. If pattern specifies no captures, then the whole match is returned. A third, optional numerical argument init specifies where to start the search; its default value is 1 and can be negative.