• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How can I delete multiple tags of both opening and closing tags but keep the text between tags?

Community Beginner ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

I want to delete multiple tags of both opening and closing tags.

For example, in the next tags,

 

<span class="b">text</span>

 

I want to delete both <span class="b"> and </span>

but text should not be deleted.

 

There are a lot of codes like 

 

<span class="b">text</span>

<span class="b">happy</span>

<span class="b">time</span>

 

How can I delete not only <span class="b">, but also </span> but keep the 

text

happy

time

? (in the example above)

 

Thank you for your help.

 

 

 

Views

619

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 26, 2021 Jul 26, 2021

@tomoakin33355574  try using search in files (Ctrl Shift F) then in advanced mode

 

search for SPAN node

havin an attribut class equal to B

 

then in action of replacement choose

cleaning node

 

it will remove the node, but not the node text

(be sure to make a back up of your site, before dealing with large search and replace in files

Votes

Translate

Translate
LEGEND ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

You could use the Find and Replace option in Dreamweaver:

 

Find:

<span class="b">text</span>

 

Replace with:

text

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

Thank you. 

 

But I want to delete all the 

 

<span class="b"></span>

 

at the same time because 100 of the texts which uses 

 

<span class="b"></span>

 

 

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

I think I need to do it manually for all. I appreciate your help a lot.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

I mean at the same time. like using find and replace all. not manually. I use dreamweaver. I really appreciate your help. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

Well just perform 'Find and Replace' 3 times 1 for each situation, DW will take care of all the instances it finds.

 

Find:

<span class="b">happy</span>

Replace with:

happy

 

Find:

<span class="b">time</span>

Replace with:

time

 

 

There may be an expression you can use to just find all instances of:

 

<span class="b"></span>

 

and replace it with nothing, lets see if anyone can help out with an expression.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

 

There may be an expression you can use to just find all instances of:

 

<span class="b"></span>

 

and replace it with nothing, lets see if anyone can help out with an expression.

 

yes, exactly!  this is what I wanted to find out. I thought the same thing with you and thought it should not be difficult. But so far, adobe support even does not know it, so this can be very challenging topic. 

 

I just wanted to get rid of all the unnecessary tags which is accidentally added.

 

If we know this method, I think it helps a lot of blogers time, including me.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

Thank you very much for your help!

I will try the method you showed me!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

@tomoakin33355574  try using search in files (Ctrl Shift F) then in advanced mode

 

search for SPAN node

havin an attribut class equal to B

 

then in action of replacement choose

cleaning node

 

it will remove the node, but not the node text

(be sure to make a back up of your site, before dealing with large search and replace in files

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 03, 2024 May 03, 2024

Copy link to clipboard

Copied

LATEST

This is the absolute best solution and should be identified as such

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines