Yoinx commented on a Page, Fun Talkers  -  Jan 23, 2006

now, Im not trying to rip on anything, I just want to point out two seperate ways to do this (my regex example might not be the best way to do it though.)

alias ra say $replace($1-,a,2a,b,3b,c,4c,d,6d,e,12e,f,13f,g,14g,h,15h,i,2i,j,3j,k,4k,l,6l,m,12m,n,13n,o,14o,p,2p,q,3q,r,4r,s,6s,t,12t,u,13u,v,14v,w,15w,x,2x,y,3y,z,4z)

alias ra {
.echo -q $regsub($1-,/(.)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)/ig,0\11\22\33\44\55\66\77\88\99\1010\1110\1111\1212\1313\1414\1515\16,%text)
say %text
}

personally, Id combine them all into the single replace method for each alias... just makes it a little faster, since you\'re only making one call to $replace, instead of 26. However, the $regex method, wont change the case of characters, where the replace would replace K with k

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.