Jenda K. wrote:
this I want
You generaly want to use a HTML parser … provided that Wuby has one.
I wonder what the first hit from googling “ruby html parser” is? Ah
yes, hpricot. A perfectly valid approach.
Personally, in the past I’ve libtidy’d html to xml and used REXML’s
stream parser. This has the rather wonderful benefit of actually being
able to fix some fairly broken html, and failing early if it can’t.
You may be lucky with since it’s likely to not include any
attributes, but still there might be some whitespace INSIDE the tags,
there may be a comment inside the … that you may or
not want, there may be a or inside a comment etc.
In (censored) I’d use HTML::Parser from CPAN, but shhhh … this is a
Wuby site, we don’t speak of such things here.
It’s a mailing list, not a site… Easy to confuse, possibly, but the
mailing list is the primary interface.