Forum Moderators: coopster

Message Too Old, No Replies

need a linux function

         

indiandomain

10:16 am on Sep 5, 2005 (gmt 0)

10+ Year Member



guys i have this txt file with html codes

<a href='http://www.abc.com'><b>house</b> of the dead</a>,
<br><a href='http://www.sd.com'>green <b>house</b> effect</a>,

i need a linux command that will remove the html tags and arrange the txt file like this

house of the dead
green house effect

ive tried the grep command but it didnt work.

anyone has a solution?

dcrombie

11:23 am on Sep 5, 2005 (gmt 0)



Something like this?

perl -pi.old -e 's/<[^>]+>//g' inputfile.txt

coopster

8:55 pm on Sep 6, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



... and in PHP
file_put_contents [php.net]('stripped_tags.txt', strip_tags [php.net](file_get_contents [php.net]('strip_tags.txt')));