It seems that backslashes are truncated when posting. I can\'t seen any of them in my last post.
Here\'s the code with plain \'backslash\' in it which are to be replaced for sure.
alias rtrig.x {
return $regsubex($1-,/(sin|cos|tan)(x+)/g,\'backslash\'1 $+ $regsubex(s,\'backslash\'2,/(x)/g,$+($chr(40),x,$chr(41))))
}