Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
ChuckWWW #1
Tricky find/replace within <A HREF> tags
I need to add a 'class = 'link' attribute to every <a
href='http://www.somelinkthat is different ever time'> tag that my script is
processing. So I guess what I need to do is find every a href tag, locate the
last bracket and replace that last bracket with the new attribute, and then add
the last bracket back. Tricky thing is, how do I isolate all the <a href>
tags in the block of HTML that is being submitted, and then find the last
bracket so that I can run the find/replace? Thanks for any suggestions.
ChuckWWW
ChuckWWW Guest
-
Using DW find to find tags not on page
I transfering content from 1498 static pages into a MySQL database. I've isolated 1450 pages with single h1 or h2 tags that I can use in the title... -
Need help with Find & Replace
Hiya. I've tried everything I know to find and replace text in 400+ documents and now need some help with it. This is the existing source code: ... -
find and replace options
Hello all. I'm new to Contribute and would like to do a sitewide find and replace but can't figure out how to do this. Is it even possible in... -
find/replace
when a user searched for a value with find/replace from a form he got the message the value could not be found but when I looked for it in the... -
find and replace everything between 2 tags
Hello aronk, Backup the files first. Then set up Find and Replace to Find (there shouldn't be any line breaks): (<!DOCTYPE HTML PUBLIC... -
Terry Bankert #2
Re: Tricky find/replace within <A HREF> tags
Well if your just adding a class to the href all you would need to do is.
REPLACENOCASE(YourString, "<a", "<a class='link'", "ALL")
"ChuckWWW" <webforumsuser@macromedia.com> wrote in message
news:d0s23a$j3v$1@forums.macromedia.com...>I need to add a 'class = 'link' attribute to every <a
> href='http://www.somelinkthat is different ever time'> tag that my script
> is
> processing. So I guess what I need to do is find every a href tag, locate
> the
> last bracket and replace that last bracket with the new attribute, and
> then add
> the last bracket back. Tricky thing is, how do I isolate all the <a
> href>
> tags in the block of HTML that is being submitted, and then find the last
> bracket so that I can run the find/replace? Thanks for any suggestions.
> ChuckWWW
>
Terry Bankert Guest



Reply With Quote

