Just a guess, but... Idea 1: I believe the regex in Cold Fusion is greedy.
This means it will take the largest chunk of data that matches a particular expressions. If this is true, then the part of your expression that follows is going to stretch from the first anchor to the close of the LAST anchor. >.*</a> You might want to change to ><[^>]*></a> Idea 2: escape the quotes with \, just in case. I don;t think you need to, but you might. FWIW Jerry Johnson >>> [EMAIL PROTECTED] 05/10/02 09:22AM >>> Hi, Can anyone advise me with this Regex problem I'm having? I need to convert all instances of an HTML string into a bracketed number (taking the number from the URL string pid=n). At the moment, the following is converting the first instance perfectly.....but no other ones after that, despite me telling it to! Here's the code: <CFSET bodytext = REReplaceNoCase(bodytext, "<a href=""viewphoto.cfm\?pid=([^""]*)"">.*</a>", "[\1]", "ALL")> The HTML to strip would look like: <a href="viewphoto.cfm?pid=100"><img border=0 src="imagebin/photolink.gif"></a> And this would turn it into [100] Any clues why it's not picking up all instances? Thanks Will ------- Become a Pingographer and share your photos for free: http://www.localbounty.com/pingo ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

