Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7054799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:40:16+00:00 2026-05-28T03:40:16+00:00

I need to resolve a question that has kept me all day trying to

  • 0

I need to resolve a question that has kept me all day trying to resolve it.

I have the following XML file:

<p> </p>
<p> </p>
<p class="subtit">Transporte:</p>
<p>Para transporte desde y hacia el Aeropuerto Internacional Arturo Merino Benítez (fono 56-2-690 19 00) existen diversas empresas que prestan este servicio: buses, minibuses y taxis. Se recomienda contratar transporte autorizado dentro del aeropuerto.</p>

<TXT_accesp>
<p>Climate:</p>
<p>Santiago has a temperate Mediterranean climate with an annual average temperature of 14.5º Celsius. September is the start of spring, the climate is gentle and fresh with highs reaching 28 degrees during the day that drop to 6º C (43º F) to 12º C (54º F) at night.</p>
<p> </p>
<p>Language:</p>
<p>Spanish</p>
<p> </p>
</TXT_accesp>

<p> </p>
<p> </p>
<p class="subtit">Transporte:</p>
<p>Para transporte desde y hacia el Aeropuerto Internacional Arturo Merino Benítez (fono 56-2-690 19 00) existen diversas empresas que prestan este servicio: buses, minibuses y taxis. Se recomienda contratar transporte autorizado dentro del aeropuerto.</p>

Then I remove all tags <p> </ p> without deleting the text that is inside, but only those <p> </ p> found inside the tag <TXT_accesp> and </ TXT_accesp>

I’m doing it with bash as many files will be where I need to replace those tags. What I’ve done so far is the following:

sed -e 's/<TXT_accesp><p>\(.*\)<\/p><\/TXT_accesp>$/\1/g' example.xml

The idea is to remove all <p> </ p> text or independent if they are not inside, but if you have text not removed. After that, the idea is that you save the changes.

Can you help me?

Thirst is not whether the command is indicated or if I combine it with another. In addition, regular expressions do not know if it’s correct.

Thank you very much everyone!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:40:16+00:00Added an answer on May 28, 2026 at 3:40 am

    If you wish to remove the <p> and </p> tags inside <TXT_accesp> and </ TXT_accesp> then you can use something like this –

    sed '/\<TXT_accesp\>/,/\<\/TXT_accesp\>/s@</\?p>@@g' INPUT_FILE
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to generate an actionlink on a page that has the following route:
I have an XML file (urlrewrite.xml) that needs a property placeholder resolved. I enable
The question is probably extremely easy to resolve, but I need to resolve it
Need some help about with Memcache. I have created a class and want to
I have a User entity which has a HasCompletedSecurity property which indicates whether that
I realize this question has been asked many times and I am have looked
I know this question has already been asked but I am in urgent need
I have a problem I am trying to resolve. We have a SQL Server
To preface we have a strange requirement that all dialogs must be modeless for
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Timer.html The reason for this question is that I have a timer running at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.