What you want could only be created using an internal command becuase using an alias I beleive the proccessing time of calling the alias that sorts out what you want is likely to exceed the time it would take to simply do the $GETTOK.
PS: u also missed $x(name,-3-) which is just another thing u would have to code for as well, all this code being executed verse one internal command
I would bet the internal command beats it every time, your just passing a string and some 2 or 3 parameters to a internal routine.

Now i would suggest you look at $regex & $regml as i believe this may with some understanding (more than mine) well do exactly what you ask, or very close to it.