Skip to main content
Inspiring
May 30, 2021 8:45 AM UTC
Answered

Find & Replace in DW 21.1

Hi

I would like to clean up html code that includes tags such as

<p class="Paragraph-Style-14pt" id="u291729-41" style="user-select: auto;">  to replace it with just <p>

 

I can removed most of the  code, by F-R most of the repeating elements with a blank, to be left with just:

<p "uSOMENUMB-ER">

The problem is that this id number is variable with every entry. How do I find-replace to be left with just the <p> tag? The number varies with every entry.

This topic is closed to new replies. Start a new post to keep the conversation going.
B i r n o u
B i r n o uCorrect answer
Legend
May 30, 2021 5:15 PM UTC

nope, you didn't search the right place and the right query...

here is the search and reasearch dialog that you should have

 

8 replies

Nancy OShea
Community Expert
Community Expert
May 30, 2021 6:55 PM UTC

In case you're not fluent in French, See my F&R screenshot in English.  Click the Advanced tab. 

Find in Current Document all paragraphs with an ID of any value and remove the ID. 

 

 

 

Translate
Nancy O'Shea— Product User & Community Expert
B i r n o u
Legend
May 30, 2021 2:58 PM UTC

when you hit Find and replace in files (Ctrl Shift F) you will be able to get an advanced search and replace mode.

so now from the advanced TAB , you will have to set the dropdown menu to search for different attributes (ID, class, style), located in the target parent TAG (<p>) and simply remove them

 

 

Translate
Weat01Author
Inspiring
May 30, 2021 3:18 PM UTC

I tried this but the problem is it doesn't accept what I am  searching for - eg <p id="*"> Doesn't work -  what I need is a wildcard field of some kind?

Translate
B i r n o u
Legend
May 30, 2021 5:16 PM UTC

do you get the seame setting in the dialog ?

Translate
Ged_Traynor
Community Expert
Community Expert
May 30, 2021 11:19 AM UTC

Moving thread to the Dreamweaver forum from Using the Community

Translate