Keeps on replacing untill there is nothing more to replace
;Usage: works just like $replace , the only difference is it will keep on replacing untill there is nothing more to replace
;Examples:
;$replacefull(3----5+++++++3-+-----+++2,++,+,--,+,+-,-,-+,-)
;returns: 3+5+3+2
;$replacefull(aaaaaaaaaaaaaaaa,aa,a).cs
;returns: a
;NOTE that .cs is the case-sensitive version
alias replacefull {
var %a = $1, %b, %c, %d = 2
;Construct replace
while (%d <= $0) {
%c = $+(%c,$chr(44),$eval($+($,%d),2))
inc %d
}
;Loop through replace
while (%a != %b) {
%b = %a
%a = $eval($+($eval($replace,0),$prop,$chr(40),%a,%c,$chr(41)),2)
}
return %a
}