[luau] Perl String Question
Brian McSheehy
brian at proservicepeo.com
Wed Mar 24 18:35:59 PST 2004
Sure,
perl -pe 's{</?br>}{}g'
brian at BigBlue:~$ echo "<br>Some String</br>" | perl -pe 's{</?br>}{}g'
Some String
brian at BigBlue:~$
--Brian
----- Original Message -----
From: Matthew John Darnell
To: luau at videl.ics.hawaii.edu
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freesoftwarehawaii.org/pipermail/luau-freesoftwarehawaii.org/attachments/20040324/f7239f20/attachment-0001.htm>
More information about the LUAU
mailing list