Link to home
Start Free TrialLog in
Avatar of Shawn
ShawnFlag for Canada

asked on

find "&" at end of string and delete

I am trying to strip an url and cna do most of it except get rid of the "&" which is somethimes left at the end of the string. below I can get rid of "&language=english
 <cfset CurrentURL = replacenocase(CurrentURL, "&language=english", "", 'all')>

how would I use a regex to get rid of any "&" at the end of the string?
ASKER CERTIFIED SOLUTION
Avatar of erikTsomik
erikTsomik
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Shawn

ASKER

thanks
ended up with
<cfset CurrentURL = rereplacenocase(CurrentURL, "[&]+$", "", 'all')>