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

  • SEARCH
  • Home
  • 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 8615605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:25:09+00:00 2026-06-12T05:25:09+00:00

I want to remove the STRONG tags in a text-file. I’m using sed ‘s/<

  • 0

I want to remove the STRONG tags in a text-file.

I’m using sed 's/< strong>/>/g' for removing the STRONG tag and that works fine.

But when I want to remove the < /STRONG> tag with this sed 's/< /strong>//g'
it states the following error sed: -e expression #1, char 13: Unknown option tos’`

I believe it has to do with the < /-part but I don’t know what. Can somebody please explain me how to fix it?

The space between < and strong and others is on purpose for this question-only

  • 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-06-12T05:25:11+00:00Added an answer on June 12, 2026 at 5:25 am

    Your problem is that you are using / as a pattern/replacement separator, if you want to match/replace one (/), you must escape it (like: \/) that way, but more on that see below.

    sed is not an ideal tool for (X|HT)ML processing. If the tag does not span to multiple lines, it might work for you:

    sed 's_</\s*\?strong>_>_g' INPUTFILE
    

    This replaces both <strong>, < strong>, </strong>, < /strong> with a single > (as you had written in the question). sed can use several pattern/replacement separators, not just / (I’m using _ above.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a HTML document that I want to remove specific tags from, identified
I have this post earlier regarding removing the html tags that have empty text
I am using this pattern to remove all HTML tags (Java code): String html=text
I want to remove the string code=hads1328fas& on my URL, so that BEFORE http://example.com/main/index.php?code=hads1328fas&store=food#home
I have a string which has html tags. I want to remove the html
How can I use php to remove tags with empty text node? For instance,
My input is plain text string and requirement is to remove all html tags
I want to remove all noise tags from input tags (a string) The tags
Ok, reading a file using file_get_contents and removing <?php , <? , and/or any
I want to remove HTML tags from a String. This is easy, I know,

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.