Forum Moderators: phranque

Message Too Old, No Replies

find and replace links using regular expressions

find and replace

         

riospace

1:20 am on Jul 23, 2006 (gmt 0)

10+ Year Member



I am using Dreamweaver 8 and I am trying to figure out an easy way to remove broken links on many pages to the same site. My problem is that all of the urls point to different pages on the same site. I want to replace the following code with nothing so that all the links and the cell that they are in will be removed.

Here is an example of the code that I want to remove:

<tr>
<td colspan="2" height="16"><font face="Arial, Helvetica, sans-serif" size="1"><a href="http://www.websiteinquestion.com/c/drewbarrymore.html" target="_blank">name of website</a></font></td>
</tr>

Everything in this code is the same on every page except for the bolded part (c/drewbarrymore.html).

What would I put in the search that would find all the different variable for this part of the urls?

TerryG

10:03 am on Jul 23, 2006 (gmt 0)

10+ Year Member



mabie i read it wrong but how about "/c/*.html".
?

riospace

1:32 pm on Jul 23, 2006 (gmt 0)

10+ Year Member



TerryG, thanks it worked perfectly. That was simple enough. Is there anyway when replacing a line with an empty replace (so that the line is removed) to get rid of the blank line that is left? Is the blank line in the html a problem?

riospace

1:51 pm on Jul 23, 2006 (gmt 0)

10+ Year Member



I got a little to excited when it worked on a single page, but when I tried it site-wide, it did not find anything. It should have found about 1,200.? Why did it seem to work when I did it for the single document, but not the entire site?