User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

rfilter [2006/08/29 16:08] (current)
Line 1: Line 1:
 +# $EPIC: rfilter.txt,​v 1.2 2006/08/19 06:07:20 sthalik Exp $
 +$__rfilter__(<​word>​ <pattern list>)
 +   * 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 DO NOT match <​word>​.
 +   * This is the complement to $[[rpattern]](),​ and the inverse of $[[filter]]().
 +   * Double quoted words are honored, but the double quotes will be lost in the return value.
 +This function lets you "​filter"​ <pattern list> through a word, keeping all
 +of the patterns that do not match a given word, and discarding all of the 
 +patterns that do 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 do, this function will do that.
 +The list of patterns from <pattern list> that do not match <​word>​.
 +This function first appeared in "​plus-2"​ (post-ircII,​ pre-EPIC)
 +$rfilter(foobar f* *oo* a* *c)    returns "a* *c"
 +$rfilter(hello hello a* *lo*)     ​returns "​a*"​
rfilter.txt ยท Last modified: 2006/08/29 16:08 (external edit)