alias char { return $regsubex($1,/&#(x?([a-f\d]*));/gi,$chr($iif($left(\1,1) == x,$base(\2,16,10),\2))) }
Not sure how much time I spent on the original code but I hope it wasn't much lol.