beforew
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | beforew [2007/03/02 02:32] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | # $EPIC: beforew.txt, | ||
| + | ======Synopsis: | ||
| + | $__beforew__(< | ||
| + | |||
| + | ======Technical: | ||
| + | * If the < | ||
| + | * The <pattern list> does not actually need to be a list of wildcard patterns. | ||
| + | * If < | ||
| + | * Otherwise, the function behaves "as if" the following had been performed: <val> = rmatch(< | ||
| + | * Remember that <pattern list> is a list of [[what is a word|words]]. | ||
| + | |||
| + | ======Practical: | ||
| + | This function lets you get the part of <pattern list> that occurs BEFORE | ||
| + | the pattern that is the "best match" for < | ||
| + | this function with a list of literal words. | ||
| + | |||
| + | ======Returns: | ||
| + | The portion of <pattern list> before the pattern that is the "best match" | ||
| + | of < | ||
| + | on pattern matching for more detail. | ||
| + | |||
| + | ======Examples: | ||
| + | < | ||
| + | $beforew(foobar one two foobar my shoe) returns "one two" | ||
| + | $beforew(booya one two foobar my shoe) | ||
| + | $beforew(foobar o* t* f* m* s*) returns "o* t*" | ||
| + | $beforew(booya o* t* f* m* s*) | ||
| + | $beforew(foobar f* fo* foobar foo* foob*) | ||
| + | </ | ||
| + | |||
| + | ======History: | ||
| + | This function first appeared in "plus 2" (post-ircII, | ||
beforew.txt · Last modified: 2007/03/02 02:32 by 127.0.0.1
