I have used this kind of code for years without any problems:
<cfset zurl = #cgi.SCRIPT_NAME#&'?'&#cgi.QUERY_STRING#>
<cfset arg2remove = 'LoginID='&#url.LoginID#>
<cfset q = reReplaceNoCase(cgi.query_string, arg2remove, "")>
The use of regex is not necessary.