Your IP : 216.73.216.48


Current Path : /usr/X11R6/share/epic5/help/6_Functions/
Upload File :
Current File : //usr/X11R6/share/epic5/help/6_Functions/pattern

# $EPIC: pattern,v 1.4 2001/07/23 17:53:03 jnelson Exp $
Synopsis:
   $pattern(<pattern> <word list>)

Technical:
   * If the <pattern> argument is omitted the empty string is returned.
   * This function returns a space separated word list of all of the words
     in <word list> that are matched by <pattern>.
   * This is the complement to $filter(), and the inverse of $rpattern().
   * Double quoted words are honored, but the double quotes will be lost
     in the return value.

Practical:
   This function lets you "filter" <word list> through a pattern, keeping all
   of the words that match the pattern and discarding all of the words that
   do not match the pattern.  By appending * to a string and using this
   function, you can quickly find all words in a word list that start with
   a particular substring.

Returns:
   The list of words from <word list> that are matched by <pattern>.

History:
   This function first appeared in "plus-2" (post-ircII, pre-EPIC)

Examples:
   $pattern(*oo* foobar blah booya)     returns "foobar booya"
   $pattern(*a* hello there bob)        returns nothing
   $pattern(irc* $myservers())		returns all servers you are 
					connected to that start with
					the string "irc".

See Also:
   filter(6); match(6); rpattern(6); rmatch(6)