Forum Moderators: open

Message Too Old, No Replies

DW MX 2004 Code Searching

Wild cards in code search?

         

aaronjf

11:30 pm on Jan 13, 2004 (gmt 0)

10+ Year Member



Does anyone know if there is a way to through a wild card into a code search in Dreamweaver MX 2004.

For example... You want to find every instance of

<p class="price">$14.95</p>

and change it too

<div class="price">$14.95</div>

But, you only want to change the tags not the content between the tags. Is there a wild card opperator you can put in to find and replace code ignoring $14.95, but still change the code on both sides?

limbo

11:37 am on Jan 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I may well be missing your point but could you not just do a find and replace on the whole string - then £14.95 will still remain the same?

e.g.

Find:

<p class="price">$14.95</p>

Replace:

<div class="price">$14.95</div>

aaronjf

9:56 pm on Jan 14, 2004 (gmt 0)

10+ Year Member



The point is to ignore the content between the tags. All instances would not be $14.95.

Think if you wanted to change the tag around the price of all items in a large static ecom site, but not the prices themselves. If they were all the same you could just run a find and replace on the whole string.

limbo

11:07 pm on Jan 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oh I see. Sometimes I'm not the sharpest tool in the box.

This is what You are looking for - I think ;) :

Open the find and replace dialogue box.

Search for: "specific tag"

and replace your <p class...> tags with <div class...> tags

Ta

Limbo

aaronjf

2:09 am on Jan 15, 2004 (gmt 0)

10+ Year Member



And that would handle the opening and closing tag without touching the contents?

limbo

9:59 am on Jan 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yep

Replaces the tag and/or attributes.

Ta

Limbo