I found this in my aliases:

Code:
alias breplacestr {
  ;noop $breplacestr(&input,searchbyte1 searchbyte2,replacebytes)
  ;noop $breplacestr(&input,195 169,226 128) replace the sequence of bytes 195 169 (the é character)  by the sequence 226 128 (the • character)
  ;noop $breplacestr(&input,195 169,32) replace é with a space
  var %a 1,%p,%l $numtok($2,32),%m $numtok($3,32)
  while ($bfind($1,%a,$2)) {
    bcopy &breplacestr -1 $1 %a $calc($v1 - %a)
    bset &breplacestr -1 $3
    %a = $calc($v1 + %l)
  }
  if ($bvar(&breplacestr,0)) {
    if (%a <= $bvar($1,0)) bcopy &breplacestr -1 $1 %a -1
    bunset $1
    bcopy $1 1 &breplacestr 1 -1
    bunset &breplacestr
  }
}
Just posting it if people are interested and to illustrate the 'amount' of work, it's not so hard to write such a script but that while loop is typically inefficient, maybe $bfind(&bvar,pos,text,/command|@win) could be a thing, with $1 filled as the position, but regardless I still think /breplace should be extended


#mircscripting @ irc.swiftirc.net == the best mIRC help channel