The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Remove html tags with bash dejavu88 Shell Programming and Scripting 4 05-22-2008 01:58 PM
How to supplement HTML tags with SED DocBrewer Shell Programming and Scripting 3 04-25-2008 09:40 AM
html tags dunryc Shell Programming and Scripting 3 11-29-2007 06:14 PM
How to remove only html tags inside a file? btech_raju Linux 2 11-23-2007 12:25 PM
Automated replacement of HTML Tags nem_kirk SUN Solaris 1 11-17-2005 01:24 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-18-2004
zap zap is offline
Registered User
  
 

Join Date: Apr 2004
Posts: 6
unsing sed to strip html tags - help

Hi,
I am trying to strip html tags of a string for example

<TD>no problem</TD>

the sesult should be

no problem

but could never get rid off all the tags
sed 's/<..D>//g'

Please help, I am new
  #2 (permalink)  
Old 04-18-2004
home_king home_king is offline
Registered User
  
 

Join Date: Apr 2004
Location: China
Posts: 15
sed 's@<\([^<>][^<>]*\)>\([^<>]*\)</\1>@\2@g'

Last edited by home_king; 04-18-2004 at 03:56 AM..
  #3 (permalink)  
Old 04-18-2004
zap zap is offline
Registered User
  
 

Join Date: Apr 2004
Posts: 6
That works!
thanks home_king
The previuos one also worked but this one looks real complecated!
  #4 (permalink)  
Old 04-18-2004
home_king home_king is offline
Registered User
  
 

Join Date: Apr 2004
Location: China
Posts: 15
The complication of the pattern expression is determined by the situation.
There exists more possibility of modification of it. :-)
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:19 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0