> If the string is a JavaScript variable named str, this code should
> work:
>
> str.replace(/&$/,"");
>
> -Brad
If you want to replace all trailing "&", for example "test&&&&"
becomes "test", edit the regular expression so that the code looks
like this:
str.replace(/&+$/, "");