Here's an even faster version than the binvar one (more than twice as fast), using $regsubex():
Code:
alias rev var %a = $1 | return $regsubex(%a,/./g,$mid(%a,-\n,1))

The variable is there because of a $regsubex() bug, when it's fixed it could be as short/simple as
Code:
return $regsubex($1,/./g,$mid($1,-\n,1))


$regsubex() has a lot of potential, with a little imagination you can even do things unrelated to pattern matching smile

Edit: FiberOPtics pointed out that the alias kills spaces... as you know $mid() does retain them, it's whatever's being done internally in $regsubex() that kills them frown I want to believe that those $regsubex() problems will be ironed out eventually though.

Last edited by qwerty; 18/02/06 05:11 PM.