Adobe Dreamweaver Find and Replace code with different values tip

April 3, 2007

Say you need to find and replace text that differs but the term is similar like <span class=1> <a href=differs.htm> Something</a> the href differs but you need the <span class> moved inside the tag…

<span class="link1"><span class="link2"><a href=anything.html>

use:
<span class="link1"><span class="link2"><a href=(w*).html>

replace with:
<span class="link1"><span class="link2"><a href=$1.html>

$1, $2 etc. will replace things in brackets.

Huge timesaver if used right, as with all find and replace tools you really should think about how it will impact all the possible matches within your website. I would highly suggest making a backup of all your pages before you run this or atleast until you get used to using it. Check back for more helpful web developer tips.