It looks like you already have your answer but since my friend replied I figured I would forward it on.  -Cody
 
-----Original Message-----
From: Paul
 
$string =~ s\(<b>|</b>)\\;
 
FYI -
Normally those backslashes would be forward slashes, but since his
search string contains forward slashes, you can use another symbol to
keep perl from getting confused. For instance, I could have wrote
s*(<b>|</b>)** instead and it would have meant the same thing.
-----Original Message-----
From: Matthew John Darnell [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 5:48 PM
To: [EMAIL PROTECTED]
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