Your IP : 216.73.216.48
# $EPIC: rpattern,v 1.3 2001/07/23 17:53:03 jnelson Exp $
Synopsis:
$rpattern(<word> <pattern list>)
Technical:
* If the <word> argument is omitted the empty string is returned.
* This function returns a space separated pattern list of all of the
patterns in <pattern list> that match <word>.
* This is the complement to $rfilter(), and the inverse of
$pattern().
* Double quoted words are honored, but the double quotes will be lost
in the return value.
Practical:
This function lets you "filter" <pattern list> through a word, keeping all
of the patterns that match a given word, and discarding all of the patterns
that do not match the given word. If you have a list of patterns, some of
which match a word (say, a nick!user@host string) and some of which don't,
and you want to remove the ones that don't, this function will do that.
Returns:
The list of patterns from <pattern list> that match <word>.
History:
This function first appeared in "plus-2" (post-ircII, pre-EPIC)
Examples:
$rpattern(foobar f* *oo* a* *c) returns "f* *oo*"
$rpattern(hello hello a* *lo*) returns "hello *lo*"
See Also:
rfilter(6); match(6); pattern(6); rmatch(6)