This is my latest concoction:

refindnocase("<a.*[^target].*href.*[^target].*>",bodytext)

It finds the links, but it finds ALL links, regardless of whether they have a 
target attribute or not.  I need only the ones that DON'T have a target 
attribute.

Any help would be greatly apprecaited.

Thanks,

Dave

-----Original Message-----
From: Phillips, Dave 
Sent: Saturday, September 03, 2005 3:18 PM
To: CF-Talk
Subject: Trying to ensure links have a target attribute


Hi,

I need to be able to take in a specific body of text, search the text for any 
html links in it, and ensure that the html links have a target="_blank" 
attribute so they will all open in a new window, and then output the body of 
text with the newly modified links (or left alone if they were okay).

I know that I will probably need to do this with REReplaceNoCase, but I'm not 
an expert in regular expressions by any means.  I started by trying to find the 
links with this:

REFindNoCase("<a[.]*href[.]*>",textbody) 

But that's not working right. If anyone working today is familiar with regexps, 
I could use some help.

Thanks,

Dave
******************************************************************************************
The information contained in this message, including attachments, may contain 
privileged or confidential information that is intended to be delivered only to 
the 
person identified above. If you are not the intended recipient, or the person 
responsible for delivering this message to the intended recipient, ALLTEL 
requests 
that you immediately notify the sender and asks that you do not read the 
message or its 
attachments, and that you delete them without copying or sending them to anyone 
else. 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217295
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to