Matchall()

From TinyMUX
Revision as of 22:45, 25 November 2010 by Ihavenomouth (talk | contribs) (New page: Category:Functions {{Function|matchall(<string>,<pattern>[,<delim>])}} This function works identically to the match() function, save that it returns all matches, not just the first: ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


matchall(<string>,<pattern>[,<delim>])

This function works identically to the match() function, save that it returns all matches, not just the first: It returns the index numbers of all words in the list <string> which match <pattern>.

Example

> say matchall(This is a test of a test,test)

You say, "4 7"


> say matchall(This is testing a test,tes*)

You say, "3 5"

Related Topics

LISTS, match(), strmatch()