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 $msar()

msar
Function
$msar()
Usage
$msar(c/search/replace/data)
Returns
the result of changing the search string to replace in the given data.
The command character c can be any combination of:
i to make the replacement case-insensitive;
r to treat data as the name of a variable and to operate on its value, storing the result back in the variable;
g to do all matches in the given data (global) and not just the first.

The delimiter can be / but can be any other character that is not a command letter (i r or g); obviously you must use the same delimiter in all three places.
Returns the empty string on error.



previous: mkdir next: msar