>- see footer for list info -< Try this: <cfset myref = myref.replaceAll( '(?<=[&?])[a-z]+q=[^&]++&?' , '' ) />
That's using Java regex (the string.replaceAll func) since regular CFML regex doesn't support lookbehinds - will work in all regex engines that run on Java. And to explain that regex, here's it disected in comment mode: (?x) # enable regex comment mode (?<=[&?]) # start with either & or ? but don't include in match [a-z]+q= # one or more a-z followed by q= [^&]++ # possessively match any non-ampersand &? # optionally match ampersand to avoid result having ?& or && after replace. All make sense? _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
