Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stripping HTML tags with Perl



>>>>> On Tue, 5 Dec 2000 12:33:53 +0900, "Stephen J. Turnbull" <turnbull@example.com> said:

>>>>> "Viktor" == Viktor Pavlenko <vp@example.com> writes:
    SJT> <address default="<phb@example.com>">

    SJT> which may or may not be legal HTML.

    Viktor> So, use s/<\/?[^>]+>//g to get rid of all html tags

    SJT> In the case above this leaves `">'.

s/<\/?(<[^>]*>|[^>])+>//g handles that... (not going for the best one)

Viktor


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links