Sure,
 
perl -pe 's{</?br>}{}g'
 
[EMAIL PROTECTED]:~$ echo "<br>Some String</br>" | perl -pe 's{</?br>}{}g'
Some String
[EMAIL PROTECTED]:~$
 
--Brian
----- Original Message -----
Sent: Wednesday, March 24, 2004 5:48 PM
Subject: [luau] Perl String Question

Aloha,
 
If I have a string "<b>Yo ho ho and a bottle of rum</b>" is there an elegant way to eliminate the '<b>' & '</b>'?
 
It would also need to return nothing for the string "<b></b>"
 
I could hack something up, but I am thinking it could be accomplished in one line of code.  I am sure there is more than one way to do it.
 
As you probably guessed, I am parsing a web page.
 
-Matt

Reply via email to