See my previous response -- if you use regex, you're probably better
off just removing target attributes and then adding it to all links.
The problem with the concoction here is that ... well, several
things... getting "everything that's not the word 'target'" requires
something called negative look-ahead, which is different than a class
which is what you're using ... the negated class [^target] will find
any character that isn't one of t, a, r, g or e ... so if I put <a
href="whatever"> in the text, this regular expression will find "<a
h", but since you've specified .*href following that, it'll just find
"<a " since it will want to find "href"... also, you'll run into
problems with having href in the regex at all, because the target
attribute can be either before or after the href, plus any number of
other attributes which are valid for links and can appear anywhere in
the tag.
> 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
s. isaac dealey 954.522.6080
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:217297
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54