you could probably do it like
alias commas {
var %in = $remove($1-,$chr(44))
if (%in !isnum) { return }
return $regsubex(%in,/\G((?:^-)?\d\d?\d?)(?=(?:\d\d\d)+(?:\.\d+)?$)/g,\t $+ $chr(44))
}
Note: this will also fix commas in a Number.
Ie: 1,26,4564 would be returned as 1,264,564
;Edited to improve regex to allow for decimals