wouldn't this do just about the same thing?
$regsubex($1-,/(.)/g,$+($chr(3),$base($r(0,7),10,10,2),$chr(44),$base($r(8,15),10,10,2),\1))