in reply to HTML Matching

your code fails with tags that span multiple lines, you should use something like:
$/ = undef; $_ = <STDIN>; s/<[^>]+?>//mg; print;

Replies are listed 'Best First'.
Re: Re: HTML Matching
by autark (Friar) on Nov 19, 2000 at 01:24 UTC
    But his regexp does not contain neither ^ nor $, so what good will /m do ?

    His choice of character class [^>] matches anything _except_ the '>' character, that includes newlines.

    Autark.