This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > September 2005 > Advanced replacement problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Advanced replacement problem
zero

2005-09-13, 7:33 pm

I have this paragraphs (all over my documents)

<p><span class="mystylefav">Bla bla bla</span></p>

I need to mass replace all span tags with attribute class = mystylefav
inside
a p tag like this:

<p class="mystylefav">Bla bla bla</p>


I couldn't find the way to do it throug find and replace in 1 step.
Is there any?

The closer I got was strip tag like this:
<p>Bla bla bla</p>

But I lost mystylefav in paragraphs...


ChrisBank

2005-09-13, 7:33 pm

Try doing two searches, first search for the p containing your span with
class attribute mystylefave and set the class attribute on the p, then
search for the span and strip it.

Chris
datamystic@gmail.com

2005-09-14, 7:20 pm

Use Web Search and Replace from http://www.searchandreplace.net, first
with a Restrict to HTML tag, with the tag set to <p>..</p>, (ensure you
have include tag text checked) and inside this, a subfilter to
1) Remove <span> tags
2) Replace <p> with <p class="mystylefav">

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews