I wasn't very strict with ensuring that the string was found in <a></a> tags... although it would be simple to add if you need that... I only made sure that it was either &productid=NUMBER or ?productID=NUMBER (regardless of case)
I just wanted to make sure that I got a simple solution posted before anyone had the chance to fall for the inevitable reextract sales pitch that seems to follow every regex question on this list these days. <cfscript> function freeFunction(str) { var tmp = ''; var tmpArr = arrayNew(1); while(refindnocase(".*?(&|\?)productID=([0-9]{1,})[^0-9]", str)) { str = rereplacenocase(str, ".*?(&|\?)productID=([0-9]{1,}).*?[^0-9]", "[**\2**]"); tmp = arrayappend(tmpArr, rereplacenocase(str, "\[\*\*([0-9].*?)\*.*", "\1")); } return tmpArr; } </cfscript> <cfdump var="#freeFunction(myString)#" /> ..:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299114 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4