Hi First off, remove the leading "'^.*" and trailing ".*$"; they aren't necessary in this case and just get in the way Also, you need to backquote the literal ()'s to distinguish them from ()'s that are part of the regex. Also, you could use the [[:digit:]] thing instead of [0-9], but you don't need too.
Without testing it, this will be closer... <CFSET foo = REReplaceNoCase(foo,'<A class=jargon href="javascript:popUpJargonDefinition\(([0-9]*)\)">([^<]*)</a>',"\1")> Also, I'm not sure if REReplaceNoCase is going to do exactly what you want... you might consider using REFindNoCase with returnsubexpressions set to true. This will give you the position of the first match and you can manually do a string extraction and replace from that. It all depends on what you want the end result to look like. Mark -----Original Message----- From: Oliver Cookson [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 8:41 AM To: CF-Talk Subject: OT: RegEx Question Hi, In a nutshell I need to find all instances of the below link (see below) in a article. The article could be 2 lines long or 2000 lines long and the again the there could be 2 links or 2000 links. This is an example of the link I need to look for and replace: <A class=jargon href="javascript:popUpJargonDefinition(136)">katie</A> NOTE: The ID (in this case "136") will change and the label (in this case "katie") will also change, everything else will be the same. This is how far I got but it doesn't work and im really scratching my head: <CFSET foo = REReplaceNoCase(foo,'^.*<A class=jargon href="javascript:popUpJargonDefinition([0-9]*)">([^<]*)</a>.*$',"\1")> (sorry for the word wrap) Any help would be greatly appreciated! Thanks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4