TinyMUX

Grab()

Functions

FUNCTION: grab(<list>, <pattern>, <delim>)

This function matches <pattern> against each word in <list>, returning the first word that matches. If no words match, then an empty string is returned. The match is not case-sensitive, and wildcard characters are permitted in <pattern>. <delim> may be used to specify a list delimiter other than a space.

Examples:

> say grab(This is a new test,?e*)
You say, "new"
> say grab(Holodeck:#10~Airlock:#58~Dorm:#12~Brig:#83,Airlock:*,~)
You say, "Airlock:#58"

Related Topics: graball(), LISTS, member(), match(), regrab().