[TriLUG] simple regular expression to strip HTML?

Jeremy Portzer jeremyp at pobox.com
Wed Feb 18 21:28:30 EST 2004


I would have posted this to the dev@ list, but we've discontinued it...
:-|

Does anyone know of a quick-and-dirty regular expression that will strip
simple HTML tags?  I'm not looking for something that is necessarily
100% safe/tested, but something reasonable that will work.  It needs to
use the regular C regexp set of calls, not Perl extensions.

For example:  "<em>Bold</em> type" should substitute to "Bold type"

--Jeremy
-- 
/---------------------------------------------------------------------\
| Jeremy Portzer       jeremyp at pobox.com       trilug.org/~jeremy     |
| GPG Fingerprint: 712D 77C7 AB2D 2130 989F  E135 6F9F F7BC CC1A 7B92 |
\---------------------------------------------------------------------/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20040218/e6200fbf/attachment.pgp>


More information about the TriLUG mailing list