String Functions

absstrlen after afterw ascii before beforew center chngw chr common copattern count decode diff encode filter findw fromw getmatches getrmatches index insertw isalpha isdigit isnum isnumber left leftpc leftw match mid midw msar notw numsort numwords pad pass pattern pop push regcomp regerror regexec regfree remw remws repeat rest restw reverse revw rfilter right rightw rindex [rmatch] rot13 rpattern rstrstr rword sar shift sort splice split strip strlen strstr tolower toupper tow tr translate uniq unshift word

Liam's BitchX Command Reference

BitchX scripting function $rmatch()

rmatch
Function
$rmatch()
Notes
It is possible to embed spaces into a word or pattern simply by including the entire word or pattern within quotation marks (")
Usage
$rmatch(word list of patterns)
Returns
if no pattern in the list matches the word, it returns 0. Otherwise, it returns the number of the pattern that most exactly matches the word (first word is numbered one)
Example
$rmatch(foobar f*bar foo*ar g*ant) returns 2 $rmatch(booya f*bar foo*ar g*ant) returns 0


previous: rindex next: rmatch