OK, that's some pretty sloppy HTML, but let's see. Same principal should work:
myVar = reReplaceNoCase(myVar, '<\s*a ', '<a onclick="popwin(this.ref); return false;" ', 'all'); On 5/3/2010 1:13 PM, Robert Nurse wrote: > >> how about simplifying? >> >> replaceNoCase(myStr, '<a ', '<a onclick="popwin(this.ref); return false;" >> ', 'all'); >> >> [note the training space in the test and the replacement] >> > This doesn't work for: > > < a href="somelocation.cfm">Some Place</a> > > My original regex took care of all white space before the "a", and any amount > of white space between the "a" and "href" > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333307 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

