Suppose you want to write HTML::Parser in pure Perl. (Or is it already?) What would you use for the job? - You guessed it. The opposite of parsing HTML is treating it as an unstructured stream of characters - whether you use pattern matching is orthogonal to the approach taken.